Skip to main content

Simple, yet powerful, code-based menus for Django applications

Project description

https://img.shields.io/travis/borgstrom/django-simple-menu.svg https://img.shields.io/codecov/c/github/borgstrom/django-simple-menu.svg 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+

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-simple-menu-1.2.0.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

django_simple_menu-1.2.0-py2-none-any.whl (9.4 kB view details)

Uploaded Python 2

File details

Details for the file django-simple-menu-1.2.0.tar.gz.

File metadata

File hashes

Hashes for django-simple-menu-1.2.0.tar.gz
Algorithm Hash digest
SHA256 718b4f22968f33eae865bb45a8596e1a9af87de9da66c4e27ec13668163004ac
MD5 c730d8edea0aae5430e61903d3214658
BLAKE2b-256 bc7a8cba709f3264552714df2c5fcce3aa888b50b9fd25874b24007233894f37

See more details on using hashes here.

File details

Details for the file django_simple_menu-1.2.0-py2-none-any.whl.

File metadata

File hashes

Hashes for django_simple_menu-1.2.0-py2-none-any.whl
Algorithm Hash digest
SHA256 5e2f4ec731e0f287f9889cf42ac69311ee43925b6db3f2cce78fb1cec8341e1a
MD5 e1019df4ca21c43b1eefa79c210672b1
BLAKE2b-256 e24b0b8a5a147730f259b234acc3914dd15ef5117cb573b6b3fc9c88d3b72c43

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