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
e9f97ba1
Commit
e9f97ba1
authored
Jul 01, 2019
by
P.J. Janse van Rensburg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use modals on sqla example app
parent
79052263
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
app.py
examples/sqla/app.py
+2
-1
No files found.
examples/sqla/app.py
View file @
e9f97ba1
...
@@ -173,7 +173,6 @@ class UserAdmin(sqla.ModelView):
...
@@ -173,7 +173,6 @@ class UserAdmin(sqla.ModelView):
can_view_details
=
True
# show a modal dialog with records details
can_view_details
=
True
# show a modal dialog with records details
action_disallowed_list
=
[
'delete'
,
]
action_disallowed_list
=
[
'delete'
,
]
form_choices
=
{
form_choices
=
{
'type'
:
AVAILABLE_USER_TYPES
,
'type'
:
AVAILABLE_USER_TYPES
,
}
}
...
@@ -264,6 +263,8 @@ class UserAdmin(sqla.ModelView):
...
@@ -264,6 +263,8 @@ class UserAdmin(sqla.ModelView):
# Customized Post model admin
# Customized Post model admin
class
PostAdmin
(
sqla
.
ModelView
):
class
PostAdmin
(
sqla
.
ModelView
):
create_modal
=
True
edit_modal
=
True
column_display_pk
=
True
column_display_pk
=
True
column_list
=
[
'id'
,
'user'
,
'title'
,
'date'
,
'tags'
,
'background_color'
,
'created_at'
,]
column_list
=
[
'id'
,
'user'
,
'title'
,
'date'
,
'tags'
,
'background_color'
,
'created_at'
,]
column_editable_list
=
[
'background_color'
,
]
column_editable_list
=
[
'background_color'
,
]
...
...
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