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
59cb6052
Commit
59cb6052
authored
Apr 09, 2012
by
Serge S. Koval
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small performance optimization.
parent
a6dcbbf4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
TODO.txt
TODO.txt
+2
-5
base.py
flask_adminex/base.py
+6
-2
No files found.
TODO.txt
View file @
59cb6052
- Core
- Core
- Pregenerate URLs for menu
- Calendar - add validation for time without seconds (automatically add seconds)
- View Site button?
- View Site button?
- Model Admin
- Model Admin
- Ability to sort by fields that are not visible?
- Ability to sort by fields that are not visible?
...
@@ -8,10 +6,8 @@
...
@@ -8,10 +6,8 @@
- Form Fields
- Form Fields
- Override field class by field name
- Override field class by field name
- Verify how boolean field is rendered
- Verify how boolean field is rendered
- Search
- Rename init_search
- Filters
- Filters
- Custom filters for date fields
- Custom filters for date fields
?
- Paginator class
- Paginator class
- Custom CSS/JS in admin interface
- Custom CSS/JS in admin interface
- Checkboxes and mass operations
- Checkboxes and mass operations
...
@@ -25,5 +21,6 @@
...
@@ -25,5 +21,6 @@
- File size restriction
- File size restriction
- Localization
- Localization
- Unit tests
- Unit tests
- Form generation tests
- Documentation
- Documentation
- Add all new stuff
- Add all new stuff
\ No newline at end of file
flask_adminex/base.py
View file @
59cb6052
...
@@ -222,6 +222,7 @@ class MenuItem(object):
...
@@ -222,6 +222,7 @@ class MenuItem(object):
self
.
_view
=
view
self
.
_view
=
view
self
.
_children
=
[]
self
.
_children
=
[]
self
.
_children_urls
=
set
()
self
.
_children_urls
=
set
()
self
.
_cached_url
=
None
self
.
url
=
None
self
.
url
=
None
if
view
is
not
None
:
if
view
is
not
None
:
...
@@ -235,8 +236,11 @@ class MenuItem(object):
...
@@ -235,8 +236,11 @@ class MenuItem(object):
if
self
.
_view
is
None
:
if
self
.
_view
is
None
:
return
None
return
None
# TODO: Optimize me
if
self
.
_cached_url
:
return
url_for
(
'
%
s.
%
s'
%
(
self
.
_view
.
endpoint
,
self
.
_view
.
_default_view
))
return
self
.
_cached_url
self
.
_cached_url
=
url_for
(
'
%
s.
%
s'
%
(
self
.
_view
.
endpoint
,
self
.
_view
.
_default_view
))
return
self
.
_cached_url
def
is_active
(
self
,
view
):
def
is_active
(
self
,
view
):
if
view
==
self
.
_view
:
if
view
==
self
.
_view
:
...
...
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