Simple, yet powerful, code-based menus for Django applications
Project description
django-simple-menu is an entirely code based menu system, because, who really wants to define their menus inside 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
Requirements: Python 3.6+, Django 3.2+
Install the django-simple-menu package.
Add simple_menu to your INSTALLED_APPS.
please ensure that you have django.template.context_processors.request listed under TEMPLATES[...]["OPTIONS"]["context_processors"].
Create menus.py inside each app you want to create a menu for and define said menus using the Menu and MenuItem classes you can import from the simple_menu package.
In your templates, load the template tags ({% load simple_menu %}) and call {% generate_menu %} inside a block. Your context will be populated with a new object named menus. You can now iterate over it to render your menus.
To quickly see django-simple-menu in action, check out the example project.
More
Full documentation, including installation and configuration instructions, is available at https://django-simple-menu.readthedocs.io/.
django-simple-menu is released under the BSD 2-Clause “Simplified” License. If you like it, please consider contributing!
django-simple-menu was originally created by Evan Borgstom <evan@borgstrom.ca> and was further developed by many contributors.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django_simple_menu-2.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4edba83df6e018a1fc23ea5f4d0d9509da792c7f2aa45f03ff07d853b7b083af |
|
MD5 | 8858b57109afb7af3561ffa723fc88aa |
|
BLAKE2b-256 | bac7bc1617a82aa666e3922b64768ccff3c18181295bc09d811931253fb3d2d3 |