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
15e93e44
Commit
15e93e44
authored
Apr 11, 2017
by
Curlyfingers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added i18 support for sub-categories
Convert _LazyString to unicode before assign to _menu_categories
parent
669c3894
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
base.py
flask_admin/base.py
+5
-3
No files found.
flask_admin/base.py
View file @
15e93e44
...
@@ -569,11 +569,13 @@ class Admin(object):
...
@@ -569,11 +569,13 @@ class Admin(object):
The name of a parent_name category
The name of a parent_name category
"""
"""
category
=
self
.
get_category_menu_item
(
name
)
name_text
=
as_unicode
(
name
)
parent
=
self
.
get_category_menu_item
(
parent_name
)
parent_name_text
=
as_unicode
(
parent_name
)
category
=
self
.
get_category_menu_item
(
name_text
)
parent
=
self
.
get_category_menu_item
(
parent_name_text
)
if
category
is
None
and
parent
is
not
None
:
if
category
is
None
and
parent
is
not
None
:
category
=
SubMenuCategory
(
name
)
category
=
SubMenuCategory
(
name
)
self
.
_menu_categories
[
name
]
=
category
self
.
_menu_categories
[
name
_text
]
=
category
parent
.
add_child
(
category
)
parent
.
add_child
(
category
)
def
add_link
(
self
,
link
):
def
add_link
(
self
,
link
):
...
...
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