Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/s-m-i-t-a/sales_menu
The simple menu for Django
https://github.com/s-m-i-t-a/sales_menu
Last synced: 5 days ago
JSON representation
The simple menu for Django
- Host: GitHub
- URL: https://github.com/s-m-i-t-a/sales_menu
- Owner: s-m-i-t-a
- License: bsd-3-clause
- Created: 2014-04-16T16:30:57.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-12-26T20:15:14.000Z (almost 2 years ago)
- Last Synced: 2024-11-02T02:07:02.467Z (12 days ago)
- Language: Python
- Size: 197 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- Changelog: HISTORY.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
Awesome Lists containing this project
README
=============================
sales_menu
=============================.. image:: https://badge.fury.io/py/sales_menu.png
:target: https://badge.fury.io/py/sales_menu.. image:: https://travis-ci.org/s-m-i-t-a/sales_menu.png?branch=master
:target: https://travis-ci.org/s-m-i-t-a/sales_menu.. image:: https://coveralls.io/repos/s-m-i-t-a/sales_menu/badge.png?branch=master
:target: https://coveralls.io/r/s-m-i-t-a/sales_menu?branch=master.. image:: https://requires.io/github/s-m-i-t-a/sales_menu/requirements.svg?branch=master
:target: https://requires.io/github/s-m-i-t-a/sales_menu/requirements/?branch=master
:alt: Requirements StatusThe simple menu for Django.
..
Documentation
-------------..
The full documentation is at https://sales_menu.readthedocs.org.Quickstart
----------Install sales_menu::
pip install sales_menu
Add ``sales_menu`` to your ``INSTALLED_APPS`` list in your settings.
``sales_menu`` requires that the ``request`` object be available in
the context when you call the ``{% menu %}`` template tag. This
means that you need to ensure that your ``TEMPLATE_CONTEXT_PROCESSORS``
setting includes ``django.core.context_processors.request``, which it
doesn't by default.And use in template::
{% menu_tags %}
{% menu %}{% for item in menu %}
{{ item.text }}
{% if menu_item in selected_menu_path %}
— selected
{% endif %}
{% for child in item.children %}
— {{ child.text }}
{% endfor %}
{% endfor %}Features
--------* TODO