Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
flask-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
flask-admin
Commits
2b471737
Commit
2b471737
authored
Apr 21, 2014
by
Serge S. Koval
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:mrjoes/flask-admin
parents
2348cf2f
c8132741
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
4 deletions
+16
-4
form.py
flask_admin/contrib/peewee/form.py
+1
-1
validators.py
flask_admin/contrib/sqla/validators.py
+4
-0
upload.py
flask_admin/form/upload.py
+1
-1
base.py
flask_admin/model/base.py
+1
-1
admin.css
flask_admin/static/admin/css/admin.css
+5
-1
admin.mo
flask_admin/translations/ru/LC_MESSAGES/admin.mo
+0
-0
admin.po
flask_admin/translations/ru/LC_MESSAGES/admin.po
+4
-0
No files found.
flask_admin/contrib/peewee/form.py
View file @
2b471737
...
...
@@ -171,7 +171,7 @@ class InlineModelConverter(InlineModelConverterBase):
attrs
=
dict
()
for
attr
in
dir
(
p
):
if
not
attr
.
startswith
(
'_'
)
and
attr
!=
model
:
if
not
attr
.
startswith
(
'_'
)
and
attr
!=
'model'
:
attrs
[
attr
]
=
getattr
(
p
,
attr
)
info
=
InlineFormAdmin
(
model
,
**
attrs
)
...
...
flask_admin/contrib/sqla/validators.py
View file @
2b471737
...
...
@@ -24,6 +24,10 @@ class Unique(object):
self
.
message
=
message
def
__call__
(
self
,
form
,
field
):
# databases allow multiple NULL values for unique columns
if
field
.
data
is
None
:
return
try
:
obj
=
(
self
.
db_session
.
query
(
self
.
model
)
.
filter
(
self
.
column
==
field
.
data
)
...
...
flask_admin/form/upload.py
View file @
2b471737
...
...
@@ -178,7 +178,7 @@ class FileUploadField(fields.TextField):
return
(
'.'
in
filename
and
filename
.
rsplit
(
'.'
,
1
)[
1
]
.
lower
()
in
map
(
str
.
lower
,
self
.
allowed_extensions
))
map
(
lambda
x
:
x
.
lower
()
,
self
.
allowed_extensions
))
def
pre_validate
(
self
,
form
):
if
(
self
.
data
and
...
...
flask_admin/model/base.py
View file @
2b471737
...
...
@@ -1272,7 +1272,7 @@ class BaseModelView(BaseView, ActionsMixin):
return
redirect
(
return_url
)
form_opts
=
FormOpts
(
widget_args
=
self
.
form_widget_args
,
form_rules
=
self
.
_form_
create
_rules
)
form_rules
=
self
.
_form_
edit
_rules
)
return
self
.
render
(
self
.
edit_template
,
model
=
model
,
...
...
flask_admin/static/admin/css/admin.css
View file @
2b471737
...
...
@@ -31,6 +31,10 @@ form.search-form .clear i {
margin
:
2px
0
0
0
;
}
form
.search-form
div
input
{
margin
:
0
;
}
/* Filters */
table
.filters
{
border-collapse
:
collapse
;
...
...
@@ -108,4 +112,4 @@ table.filters {
.list-checkbox-column
{
width
:
14px
;
}
\ No newline at end of file
}
flask_admin/translations/ru/LC_MESSAGES/admin.mo
View file @
2b471737
No preview for this file type
flask_admin/translations/ru/LC_MESSAGES/admin.po
View file @
2b471737
...
...
@@ -189,6 +189,10 @@ msgstr "Уже существует."
msgid "Model was successfully created."
msgstr "Запись была создана."
#: ../flask_admin/model/base.py:1268
msgid "Model was successfully saved."
msgstr "Запись была сохранена."
#: ../flask_admin/model/filters.py:82
msgid "Yes"
msgstr "Да"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment