Advanced configuration

Available options

There is only one optional setting for Django WP Admin that can be added to file:

    'admin': {
        'admin_site': 'test_project.admin.admin',
        'title': 'Django admin panel',
        'menu': {
            'top': '',
            'left': '',
        'dashboard': {
            'breadcrumbs': True,
        'custom_style': STATIC_URL + 'wpadmin/css/themes/sunrise.css',

As you can see this setting is a dictionary and it contains settings for each admin site you want to configure (usually you will have only one admin site under /admin/ path, so WPADMIN dict will only have settings under admin key).

Lets explain it a little:

This is a key in dict and it must be equal to the URL path where you have your admin site. So if your admin site is accessible on then all settings for this admin site must be in WPADMIN['mysuperduperadmin'].

OK so what settings are available:

Path to admin site instance. So for example if you created django.contrib.admin.sites.AdminSite instance in file in your project’s directory (so you have something like admin = AdminSite(name='admin') in that file) then you should put yourproject.admin.admin here.
Title of admin site. It will be used in title meta tag on site.
Dictionary which contains paths to classes for top and left menu to show on admin site. Read more about those classes in next section.
Dictionary containing settings not related to menus (so related to everything else on page). Currently there is only one setting available here: breadcrumbs - set it to True to see breadcrumbs on page, False to hide breadcrumbs.
Path to custom CSS file to be included on all admin pages. You should use STATIC_URL as prefix here. You can create your own custom style or use one of color themes provided with Django WP Admin. Those included themes are in wpadmin/css/themes/ and here is a list of them: blue.css, coffee.css, default.css (this one is used by default so no need to include it), ectoplasm.css, light.css, midnight.css, ocean.css, sunrise.css. So if you like coffee then you should probably put STATIC_URL + 'wpadmin/css/themes/coffee.css' in this setting ;)

Creating custom menus

By default Django WP Admin mimics Django admin page, so it does not add any custom menus on left or top of the page (you can see such default and simplest setting here (login: staff, password: staff)). If you want to add top or left menu (like those that can be seen here (login: user, password: user)) then you have to create little more complicated setup.

First create file in your project’s folder (you can use file from test project as starting template).

Then create menu class which should inherit from

from import Menu

class MyMenu(Menu):
    My super new menu ;)

In this class you should create method called init_with_context:

    def init_with_context(self, context):

And populate children list with menu items in this method:

        self.children += [
                title='Back to page',
                css_styles='font-size: 1.5em;',
                title='Auth models',
                css_styles='float: right;',

All menu items must be instance of classes from Here are available classes and their descriptions:

Basic menu item which you would want to use to create menu items for specific urls. Properties this menu item can have:
String that contains the menu item title, make sure you use the django gettext functions if your application is multilingual. Default value: ‘Untitled menu item’.
String that contains the menu item URL. Default value: None (will be rendered as ‘javascript:;’).
An optional string that contains second menu item URL. This url allows to have edit and add urls in one menu item. add_url is rendered as a small plus sign in menu, next to normal url. Default value: None.
An optional string which contains classes for icons from Font Awesome which should be used for this menu item. Note that icons may not show on all levels of menu. They are only supported at top level. Default value: None.
String containing special CSS styling for this menu item. Default value: None.
An optional string that will be used as the title attribute of the menu-item a tag. Default value: None.
Boolean that determines whether the menu item is enabled or not. Disabled items are displayed but are not clickable. Default value: True.
A list of children menu items. All children items must be instances of the MenuItem class or its subclasses.
Menu item that lists available applications. It has two additional properties:
List of strings containing paths to applications to be shown.
List of strings containing paths to applications to be excluded.
Menu item that lists available models. It has same properties as AppList.
Special menu item to show “Welcome username” string with Gravatar and basic user options like logging out and changing password. Adding menu items to children property, setting url, title and description does not make sense for this menu item as it will be ignored when rendering.

Please refer to test project’s file for more details and more complicated example.