Skip to main content

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

Project description

Jazzband Build Status Test coverage status Documentation status Supported Python versions Supported Django versions

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+

  1. Install the django-simple-menu package.

  2. Add simple_menu to your INSTALLED_APPS.

    • please ensure that you have django.template.context_processors.request listed under TEMPLATES[...]["OPTIONS"]["context_processors"].

  3. 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.

  4. 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


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-2.1.1.tar.gz (184.3 kB view details)

Uploaded Source

Built Distribution

django_simple_menu-2.1.1-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django-simple-menu-2.1.1.tar.gz
  • Upload date:
  • Size: 184.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for django-simple-menu-2.1.1.tar.gz
Algorithm Hash digest
SHA256 e402b4fdff1e84a7229c82cbab27c244737ec96ace3f203c0e7b33bd5d02f6a1
MD5 5e46ff6e52696babcc0539c97888860f
BLAKE2b-256 9285a5f088765a3e2e4f22ec49b999a39693f0e450f7a94e4b14dc90f16ea829

See more details on using hashes here.

File details

Details for the file django_simple_menu-2.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_simple_menu-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 04e1acbbf967788e389c0960c8dd6dfac53e5bb2742a7ed97e6cb7c6b2b69290
MD5 932da11dd9e627144e425fb4ea434895
BLAKE2b-256 ca0d0ddaabfbf0dd880bfe41e73213ddabe6990d4b67e30c6c7183ec4c2b6af3

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