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
ae75c20c
Commit
ae75c20c
authored
Dec 21, 2015
by
Serge S. Koval
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added M2M example
parent
aece1c22
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 @
ae75c20c
...
...
@@ -112,11 +112,12 @@ class PostAdmin(sqla.ModelView):
# Rename 'title' columns to 'Post Title' in list view
column_labels
=
dict
(
title
=
'Post Title'
)
column_searchable_list
=
(
'title'
,
User
.
username
)
column_searchable_list
=
(
'title'
,
User
.
username
,
'tags.name'
)
column_filters
=
(
'user'
,
'title'
,
'date'
,
'tags'
,
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
...
...
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