@@ -44,6 +44,7 @@ before custom option, you should known what adminlte has used.
4444- site_header
4545- site_logo
4646- welcome_sign
47+ - USE_CUSTOM_MENU
4748
4849## Widgets
4950
@@ -110,4 +111,50 @@ effect:
110111
111112## Menu
112113
113- developing ...
114+ Custom your menu depends on database && treebeard.
115+
116+ ` depth 2 ` only, more will not effective now.
117+
118+ ### Menu Setting
119+
120+ Exchange Menu by click the ` Exchange Menu ` button
121+
122+ ![ menu list] ( https://github.com/wuyue92tree/django-adminlte-ui/blob/master/images/menu-list.png?raw=true )
123+
124+ ### Menu Form
125+
126+ ![ menu form] ( https://github.com/wuyue92tree/django-adminlte-ui/blob/master/images/menu-form.png?raw=true )
127+
128+ - name: The menu name
129+ - position: The position of your custom menu, default ` left `
130+ - link_type:
131+ 1 . internal: django urls
132+ 2 . external: third part urls
133+ 3 . divide: link divide, like app verbose_name.
134+ - link:
135+ 1 . ` admin:index ` : django url name, recommend.
136+ 2 . ` /admin/ ` : django internal url, if you use i18n url, it's not a good choice.
137+ 3 . ` http:// ` : outside url
138+ - icon: [ icon] ( https://adminlte.io/themes/AdminLTE/pages/UI/icons.html )
139+ - content_type: Use for permission control, if user don't have permission to access the ` app_label:model ` in content_type, it will be skipped.
140+ - valid: This menu item effective only when the valid is True.
141+ - treebeard option: for order.
142+
143+ ### get django url name for link
144+
145+ ```
146+
147+ ╰─$ python manage.py shell
148+ Python 3.6.6 (default, Sep 29 2018, 19:18:41)
149+ Type 'copyright', 'credits' or 'license' for more information
150+ IPython 7.5.0 -- An enhanced Interactive Python. Type '?' for help.
151+
152+ In [1]: from django.urls import resolve
153+
154+ In [2]: resolve('/zh-hans/admin/video/parsed/')
155+ Out[2]: ResolverMatch(func=django.contrib.admin.options.changelist_view, args=(), kwargs={},
156+ url_name=video_parsed_changelist, app_names=['admin'], namespaces=['admin'], route=zh-hans/admin/video/parsed/)
157+
158+ ```
159+
160+ django url name = namespaces: url_name
0 commit comments