Simple, yet powerful, code-based menus for Django applications
Python HTML
Switch branches/tags
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
example
menu
.gitignore Ignore example db Jan 21, 2014
.travis.yml Now that we copy the MenuItems we can cleanup some of the code Jan 12, 2016
AUTHORS
CHANGES Re-upload to pypi as a new version to fix sdist May 1, 2016
LICENSE
MANIFEST.in Include documentation in source distribution. Jan 29, 2014
README.rst
TODO
setup.py

README.rst

Simple Django Menus

Latest PyPI version Number of PyPI downloads

django-simple-menu is an entirely code based menu system, because, who really wants to define their menus in the django admin...

It's simple to use, yet provides enough flexibility to provide unlimited children menus, per-request generation and checking of menu items, badges, and more.

Quickstart

Using django-simple-menu is easy.

Install django-simple-menu in your virtualenv and then add menu to your INSTALLED_APPS. Please ensure that you have django.core.context_processors.request listed in the TEMPLATE_CONTEXT_PROCESSORS setting.

For each of your own apps that you want to expose a menu create a new file named menus.py and define your menus using the Menu and MenuItem classes you can import from the menu namespace.

In a template you want to render a menu first {% load menu %} then call {% generate_menu %} inside a block and a new varaible named menus will be added to the context. You can now iterate over this menus object to render your menus.

To quickly see everything in action and evaluate django-simple-menut please check out the example project.

Documentation

The full documentation is located in the docs directory and can be viewed at:

https://django-simple-menu.readthedocs.org

Requirements

Django 1.6+