You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from flask_babelex import lazy_gettext
from flask_admin.consts import ICON_TYPE_GLYPH
def add_views():
mycat = lazy_gettext('My Category')
admin.add_view(MyAdminView(... , category=mycat, ...)
...
# ONLY set icon for category AFTER adding a menu-item to the category.
for item in admin.menu():
if item.is_category():
if item.name == mycat:
item.icon_type = ICON_TYPE_GLYPH
item.icon_value = "glyphicon-wrench"
break
`
category_icon_classes = {"System": "glyphicon glyphicon-wrench"}
admin = Admin(
template_mode="bootstrap3",
category_icon_classes=category_icon_classes)`
The related code is:
flask-admin/flask_admin/templates/bootstrap3/admin/layout.html
Line 27 in 280c76b
The text was updated successfully, but these errors were encountered: