OpenWISP

[admin] Improve backend side of new openwisp2 menu

Right now the menu proposed in openwisp-utils#5 looks good on the aspect side but needs improvement on the backend side, so we can include it in the next official openwisp2 release!

1. Permissions

Ensure items in the new menu are accessible only to users which have the right permissions. In our chat we shared suggestions on how to do this, you can go back in the gitter history to find out.

2. Use url tag

Use the django url template tag instead of hardcoding paths. Look on the django documentation regarding how to use it.

3. Add a reconfigurable setting

Put the list of menu items in a setting which may be overridden by our users if needed. You don't need to do anything fancy right now, just move the list of items into a setting instead of into the admin code.

For guidance on how to do this, look at other OpenWISP 2 base modules (eg: django-netjsonconfig, django-x509).

Task tags

  • python
  • ux
  • django

Students who completed this task

Hizkia Felix

Task type

  • code Code
  • web Design
close

2017