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
b886ddb2
Commit
b886ddb2
authored
Aug 26, 2013
by
Serge S. Koval
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FileAdmin unicode fixes
parent
9344f9a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
simple.py
examples/peewee/simple.py
+4
-0
fileadmin.py
flask_admin/contrib/fileadmin.py
+2
-2
No files found.
examples/peewee/simple.py
View file @
b886ddb2
...
@@ -66,6 +66,10 @@ class PostAdmin(ModelView):
...
@@ -66,6 +66,10 @@ class PostAdmin(ModelView):
'date'
,
'date'
,
User
.
username
)
User
.
username
)
form_ajax_refs
=
{
'user'
:
(
User
.
username
,
'email'
)
}
@
app
.
route
(
'/'
)
@
app
.
route
(
'/'
)
def
index
():
def
index
():
...
...
flask_admin/contrib/fileadmin.py
View file @
b886ddb2
...
@@ -12,7 +12,7 @@ from flask import flash, url_for, redirect, abort, request
...
@@ -12,7 +12,7 @@ from flask import flash, url_for, redirect, abort, request
from
wtforms
import
fields
,
validators
from
wtforms
import
fields
,
validators
from
flask.ext.admin
import
form
,
helpers
from
flask.ext.admin
import
form
,
helpers
from
flask.ext.admin._compat
import
urljoin
from
flask.ext.admin._compat
import
urljoin
,
as_unicode
from
flask.ext.admin.base
import
BaseView
,
expose
from
flask.ext.admin.base
import
BaseView
,
expose
from
flask.ext.admin.actions
import
action
,
ActionsMixin
from
flask.ext.admin.actions
import
action
,
ActionsMixin
from
flask.ext.admin.babel
import
gettext
,
lazy_gettext
from
flask.ext.admin.babel
import
gettext
,
lazy_gettext
...
@@ -173,7 +173,7 @@ class FileAdmin(BaseView, ActionsMixin):
...
@@ -173,7 +173,7 @@ class FileAdmin(BaseView, ActionsMixin):
Verify if path exists. If set to `True` and path does not exist
Verify if path exists. If set to `True` and path does not exist
will raise an exception.
will raise an exception.
"""
"""
self
.
base_path
=
base_path
self
.
base_path
=
as_unicode
(
base_path
)
self
.
base_url
=
base_url
self
.
base_url
=
base_url
self
.
init_actions
()
self
.
init_actions
()
...
...
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