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
74a9b6a6
Commit
74a9b6a6
authored
Mar 20, 2012
by
Serge S. Koval
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Configurable admin base URL
parent
989ac1c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
TODO.txt
TODO.txt
+0
-2
base.py
flask_adminex/base.py
+5
-1
No files found.
TODO.txt
View file @
74a9b6a6
- Core
- Core
- Pregenerate URLs for menu
- Pregenerate URLs for menu
- Override base URL (/admin/)
- Model Admin
- Model Admin
- Ability to sort by fields that are not visible?
- Ability to sort by fields that are not visible?
- SQLA Model Admin
- SQLA Model Admin
- Validation of the joins in the query
- Validation of the joins in the query
- Automatic joined load for foreign keys
- Automatic joined load for foreign keys
- Automatic PK detection
- Filtering
- Filtering
- Many2Many editing
- Many2Many editing
- File admin
- File admin
...
...
flask_adminex/base.py
View file @
74a9b6a6
...
@@ -97,7 +97,8 @@ class BaseView(object):
...
@@ -97,7 +97,8 @@ class BaseView(object):
`url`
`url`
Base URL. If provided, affects how URLs are generated. For example, if url parameter
Base URL. If provided, affects how URLs are generated. For example, if url parameter
equals to "test", resulting URL will look like "/admin/test/". If not provided, will
equals to "test", resulting URL will look like "/admin/test/". If not provided, will
use endpoint as a base url.
use endpoint as a base url. However, if URL starts with '/', absolute path is assumed
and '/admin/' prefix won't be applied.
"""
"""
self
.
name
=
name
self
.
name
=
name
self
.
category
=
category
self
.
category
=
category
...
@@ -123,6 +124,9 @@ class BaseView(object):
...
@@ -123,6 +124,9 @@ class BaseView(object):
# If url is not provided, generate it from endpoint name
# If url is not provided, generate it from endpoint name
if
self
.
url
is
None
:
if
self
.
url
is
None
:
self
.
url
=
'
%
s/
%
s'
%
(
self
.
admin
.
url
,
self
.
endpoint
)
self
.
url
=
'
%
s/
%
s'
%
(
self
.
admin
.
url
,
self
.
endpoint
)
else
:
if
not
self
.
url
.
startswith
(
'/'
):
self
.
url
=
'
%
s/
%
s'
%
(
self
.
admin
.
url
,
self
.
url
)
# If name is not povided, use capitalized endpoint name
# If name is not povided, use capitalized endpoint name
if
self
.
name
is
None
:
if
self
.
name
is
None
:
...
...
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