General Information

In the context of the Django-AdminLTE2-PDQ package, the “menu” is the set of navigational elements displayed on the left-hand side of the default page layout.

There are three possible configurations (which can be used together) for defining a menu in the Django-AdminLTE2-PDQ package:

Static Menu Definition

In its most basic configuration, the full sidebar is rendered by parsing the contents of a Django setting called ADMINLTE2_MENU. This setting will contain a menu definition consisting of four possible reusable Building Blocks (see Section, Separator, Node, and Tree).

Defining the menu in the settings file is best when:

  • All (or part) of the sidebar content is static.

  • The only thing that may change is the visibility of entries, based on whether or not a user is authorized to see that particular thing (More information available on the Authentication and Authorization Policy page).

Dynamic Menu Definition

In addition to defining the menu in the settings, it is also possible to pass the menu definition to each template via the context. In this situation, the context version will take precedence over the settings version. This is great if you either:

  • Need to have your menu generated dynamically from data in the database.

  • Have a combination of static and dynamic menu entries.

See the Advanced section for more information regarding dynamic menu generation, and how to create a menu that consists of a combination of both static and dynamic content.

Auto-Built Admin Menu

Django-AdminLTE2-PDQ also automatically updates the stylings of the site Django Admin pages, so that they match the same AdminLTE2 theme used by the rest of the site.

As such, it makes sense that the Django-AdminLTE2-PDQ package will generate a corresponding set of menu nav elements, to allow navigation of the admin pages.

By default, these admin menu entries will only be seen when the user is on a Django Admin page. But this behavior can be customized via some configuration options in the Django settings (See Menu Configuration and Admin Configuration).

Additionally, the icons used for each admin menu entry can be customized as well (See Admin Menu).