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
de9f1c94
Commit
de9f1c94
authored
Jan 31, 2013
by
Christopher Toth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor English cleanups in flask_admin.contrib.fileadmin
parent
ba84a1af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
fileadmin.py
flask_admin/contrib/fileadmin.py
+10
-10
No files found.
flask_admin/contrib/fileadmin.py
View file @
de9f1c94
...
...
@@ -162,7 +162,7 @@ class FileAdmin(BaseView, ActionsMixin):
:param base_url:
Base URL for the files
:param name:
Name of this view. If not provided, will
be defaulted
to the class name.
Name of this view. If not provided, will
default
to the class name.
:param category:
View category
:param endpoint:
...
...
@@ -171,7 +171,7 @@ class FileAdmin(BaseView, ActionsMixin):
URL for view
:param verify_path:
Verify if path exists. If set to `True` and path does not exist
will
throw
exception.
will
raise an
exception.
"""
self
.
base_path
=
base_path
self
.
base_url
=
base_url
...
...
@@ -198,7 +198,7 @@ class FileAdmin(BaseView, ActionsMixin):
def
is_accessible_path
(
self
,
path
):
"""
Verify if
path is accessible for
current user.
Verify if
the provided path is accessible for the
current user.
Override to customize behavior.
...
...
@@ -242,7 +242,7 @@ class FileAdmin(BaseView, ActionsMixin):
def
is_file_editable
(
self
,
filename
):
"""
Verify if
file can be edited.
Determine if the
file can be edited.
Override to customize behavior.
...
...
@@ -261,7 +261,7 @@ class FileAdmin(BaseView, ActionsMixin):
def
is_in_folder
(
self
,
base_path
,
directory
):
"""
Verify
if
`directory` is in `base_path` folder
Verify
that
`directory` is in `base_path` folder
:param base_path:
Base directory path
...
...
@@ -319,9 +319,9 @@ class FileAdmin(BaseView, ActionsMixin):
"""
Verify and normalize path.
If
path is not relative to the base directory, will throw
404 exception.
If
the path is not relative to the base directory, will raise a
404 exception.
If
path does not exist, will also throw
404 exception.
If
the path does not exist, this will also raise a
404 exception.
"""
base_path
=
self
.
get_base_path
()
...
...
@@ -353,7 +353,7 @@ class FileAdmin(BaseView, ActionsMixin):
Index view method
:param path:
Optional directory path. If not provided, will use base directory
Optional directory path. If not provided, will use
the
base directory
"""
# Get path and verify if it is valid
base_path
,
directory
,
path
=
self
.
_normalize_path
(
path
)
...
...
@@ -406,7 +406,7 @@ class FileAdmin(BaseView, ActionsMixin):
Upload view method
:param path:
Optional directory path. If not provided, will use base directory
Optional directory path. If not provided, will use
the
base directory
"""
# Get path and verify if it is valid
base_path
,
directory
,
path
=
self
.
_normalize_path
(
path
)
...
...
@@ -439,7 +439,7 @@ class FileAdmin(BaseView, ActionsMixin):
Directory creation view method
:param path:
Optional directory path. If not provided, will use base directory
Optional directory path. If not provided, will use
the
base directory
"""
# Get path and verify if it is valid
base_path
,
directory
,
path
=
self
.
_normalize_path
(
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