Skip to main content

Templatetag to render an application menu in the Django admin.

Project description

django-admin-appmenu provides a templatetag that renders an application menu in the Django admin.

https://img.shields.io/pypi/v/django-admin-appmenu.svg https://img.shields.io/pypi/pyversions/django-admin-appmenu.svg https://travis-ci.org/collab-project/django-admin-appmenu.svg?branch=master https://coveralls.io/repos/collab-project/django-admin-appmenu/badge.svg https://img.shields.io/badge/license-MIT-blue.svg

Installation

Use pip to install the download and install the package from PyPi:

pip install django-admin-appmenu

Or checkout the source code from Github:

git clone https://github.com/collab-project/django-admin-appmenu.git
cd django-admin-appmenu
pip install -e .

Add admin_appmenu to INSTALLED_APPS in your Django project settings:

INSTALLED_APPS = (
    ...

    'admin_appmenu',
)

Usage

Override the admin/base.html template and make the tag available in the template:

{% load navigation %}

Now add the admin_navigation tag to the template:

{% admin_navigation %}

After reloading the admin you will see the new menu.

To customize the output of the tag create and customize a copy of the admin_appmenu/navigation.html template.

Custom admin site

By default the standard Django admin site (django.contrib.admin.site) is used to build the menu tree. If your project uses a customized admin site set the ADMIN_APPMENU_CLASS setting to the path of the custom admin site instance.

For example in settings.py:

ADMIN_APPMENU_CLASS = 'myapp.admin.admin_site'

This also allows you to sort and format the applications list used to render the menu.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-admin-appmenu-1.0.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

django_admin_appmenu-1.0.0-py2-none-any.whl (12.9 kB view details)

Uploaded Python 2

File details

Details for the file django-admin-appmenu-1.0.0.tar.gz.

File metadata

File hashes

Hashes for django-admin-appmenu-1.0.0.tar.gz
Algorithm Hash digest
SHA256 206a27872837fed69cc4b086f7bc2546b0999a3822bbc6498b89c79af19a1592
MD5 1b3b3961ddee2160fbb21379dfee7de1
BLAKE2b-256 95d4f6954fd543491955ae9892cd5b8519f97112c997afa22492a17af91eab56

See more details on using hashes here.

File details

Details for the file django_admin_appmenu-1.0.0-py2-none-any.whl.

File metadata

File hashes

Hashes for django_admin_appmenu-1.0.0-py2-none-any.whl
Algorithm Hash digest
SHA256 6927c79b565cbf44152c99baf3279b926826bac2a80a462428a53596a889aa6d
MD5 d145ae1de485451caad588334cfbbf3e
BLAKE2b-256 df3dfd1a81fd67644da22e9afc2fdca380bbe74c852232c51adad33fbf806768

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page