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
2c1ec57d
Commit
2c1ec57d
authored
Aug 13, 2013
by
Jan Runge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix example in column_type_formatters docstring
parent
7a35ce85
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
base.py
flask_admin/model/base.py
+3
-2
No files found.
flask_admin/model/base.py
View file @
2c1ec57d
...
@@ -115,9 +115,10 @@ class BaseModelView(BaseView, ActionsMixin):
...
@@ -115,9 +115,10 @@ class BaseModelView(BaseView, ActionsMixin):
If you want to display `NULL` instead of an empty string, you can do
If you want to display `NULL` instead of an empty string, you can do
something like this::
something like this::
from flask.ext.admin import typefmt
from flask.ext.admin
.model
import typefmt
MY_DEFAULT_FORMATTERS = dict(typefmt.BASE_FORMATTERS).extend({
MY_DEFAULT_FORMATTERS = dict(typefmt.BASE_FORMATTERS)
MY_DEFAULT_FORMATTERS.update({
type(None): typefmt.null_formatter
type(None): typefmt.null_formatter
})
})
...
...
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