Commit 11cfa6b6 authored by Serge S. Koval's avatar Serge S. Koval

Updated peewee sample

parent be23851c
...@@ -41,12 +41,14 @@ class PostAdmin(peeweemodel.ModelView): ...@@ -41,12 +41,14 @@ class PostAdmin(peeweemodel.ModelView):
#list_columns = ('title', 'user') #list_columns = ('title', 'user')
excluded_list_columns = ['text'] excluded_list_columns = ['text']
# List of columns that can be sorted. For 'user' column, use User.username as # List of columns that can be sorted. For 'user' column, use User.email as
# a column. # a column.
sortable_columns = ('title', ('user', User.email), 'date') sortable_columns = ('title', ('user', User.email), 'date')
# Full text search
searchable_columns = ('title', User.username) searchable_columns = ('title', User.username)
# Column filters
column_filters = ('title', column_filters = ('title',
'date', 'date',
User.username) User.username)
......
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