Commit ae75c20c authored by Serge S. Koval's avatar Serge S. Koval

Added M2M example

parent aece1c22
...@@ -112,11 +112,12 @@ class PostAdmin(sqla.ModelView): ...@@ -112,11 +112,12 @@ class PostAdmin(sqla.ModelView):
# Rename 'title' columns to 'Post Title' in list view # Rename 'title' columns to 'Post Title' in list view
column_labels = dict(title='Post Title') column_labels = dict(title='Post Title')
column_searchable_list = ('title', User.username) column_searchable_list = ('title', User.username, 'tags.name')
column_filters = ('user', column_filters = ('user',
'title', 'title',
'date', 'date',
'tags',
filters.FilterLike(Post.title, 'Fixed Title', options=(('test1', 'Test 1'), ('test2', 'Test 2')))) filters.FilterLike(Post.title, 'Fixed Title', options=(('test1', 'Test 1'), ('test2', 'Test 2'))))
# Pass arguments to WTForms. In this case, change label for text field to # Pass arguments to WTForms. In this case, change label for text field to
......
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