use modals on sqla example app

parent 79052263
...@@ -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', ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment