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
231334c8
Commit
231334c8
authored
Feb 03, 2014
by
Matthias Urlichs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix gettext calls in fileadmin
one positional instead of keyord parameter gettext(gettext()) => gettext()
parent
5d1c0299
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
fileadmin.py
flask_admin/contrib/fileadmin.py
+7
-7
No files found.
flask_admin/contrib/fileadmin.py
View file @
231334c8
...
...
@@ -423,7 +423,7 @@ class FileAdmin(BaseView, ActionsMixin):
base_path
,
directory
,
path
=
self
.
_normalize_path
(
path
)
if
not
self
.
is_accessible_path
(
path
):
flash
(
gettext
(
gettext
(
'Permission denied.'
)
))
flash
(
gettext
(
'Permission denied.'
))
return
redirect
(
self
.
_get_dir_url
(
'.index'
))
# Get directory listing
...
...
@@ -486,7 +486,7 @@ class FileAdmin(BaseView, ActionsMixin):
return
redirect
(
self
.
_get_dir_url
(
'.index'
,
path
))
if
not
self
.
is_accessible_path
(
path
):
flash
(
gettext
(
gettext
(
'Permission denied.'
)
))
flash
(
gettext
(
'Permission denied.'
))
return
redirect
(
self
.
_get_dir_url
(
'.index'
))
form
=
UploadForm
(
self
)
...
...
@@ -547,7 +547,7 @@ class FileAdmin(BaseView, ActionsMixin):
return
redirect
(
dir_url
)
if
not
self
.
is_accessible_path
(
path
):
flash
(
gettext
(
gettext
(
'Permission denied.'
)
))
flash
(
gettext
(
'Permission denied.'
))
return
redirect
(
self
.
_get_dir_url
(
'.index'
))
form
=
NameForm
(
helpers
.
get_form_data
())
...
...
@@ -558,7 +558,7 @@ class FileAdmin(BaseView, ActionsMixin):
self
.
on_mkdir
(
directory
,
form
.
name
.
data
)
return
redirect
(
dir_url
)
except
Exception
as
ex
:
flash
(
gettext
(
'Failed to create directory:
%(error)
s'
,
ex
),
'error'
)
flash
(
gettext
(
'Failed to create directory:
%(error)
s'
,
e
rror
=
e
x
),
'error'
)
return
self
.
render
(
self
.
mkdir_template
,
form
=
form
,
...
...
@@ -584,7 +584,7 @@ class FileAdmin(BaseView, ActionsMixin):
return
redirect
(
return_url
)
if
not
self
.
is_accessible_path
(
path
):
flash
(
gettext
(
gettext
(
'Permission denied.'
)
))
flash
(
gettext
(
'Permission denied.'
))
return
redirect
(
self
.
_get_dir_url
(
'.index'
))
if
op
.
isdir
(
full_path
):
...
...
@@ -627,7 +627,7 @@ class FileAdmin(BaseView, ActionsMixin):
return
redirect
(
return_url
)
if
not
self
.
is_accessible_path
(
path
):
flash
(
gettext
(
gettext
(
'Permission denied.'
)
))
flash
(
gettext
(
'Permission denied.'
))
return
redirect
(
self
.
_get_dir_url
(
'.index'
))
if
not
op
.
exists
(
full_path
):
...
...
@@ -673,7 +673,7 @@ class FileAdmin(BaseView, ActionsMixin):
base_path
,
full_path
,
path
=
self
.
_normalize_path
(
path
)
if
not
self
.
is_accessible_path
(
path
)
or
not
self
.
is_file_editable
(
path
):
flash
(
gettext
(
gettext
(
'Permission denied.'
)
))
flash
(
gettext
(
'Permission denied.'
))
return
redirect
(
self
.
_get_dir_url
(
'.index'
))
dir_url
=
self
.
_get_dir_url
(
'.index'
,
os
.
path
.
dirname
(
path
))
...
...
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