From 8abfabe5d96a0c67ae5a30fde30b84014fb4ebc1 Mon Sep 17 00:00:00 2001 From: Deepa Pandey Date: Fri, 2 Oct 2020 03:32:22 +0530 Subject: [PATCH 1/5] fixed a typo --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 278c0d7..9b10e99 100644 --- a/README.rst +++ b/README.rst @@ -40,7 +40,7 @@ In a template you want to render a menu first ``{% load menu %}`` then call ``{% 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 +To quickly see everything in action and evaluate django-simple-menu please check out the `example project`_. .. _example project: https://github.com/jazzband/django-simple-menu/tree/master/example From 2ced8daa239e0cb1125ad1feda637f94ffe23515 Mon Sep 17 00:00:00 2001 From: AO Toprak Date: Sun, 1 Nov 2020 02:00:48 +0100 Subject: [PATCH 2/5] docs(change): fix two typos in README.rst --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 9b10e99..46d009b 100644 --- a/README.rst +++ b/README.rst @@ -37,7 +37,7 @@ define your menus using the ``Menu`` and ``MenuItem`` classes you can import fro 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 +inside a block and a new variable 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-menu please check out the From 068596d8512dd647b57faa922d5080a40e38b6c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Gonz=C3=A1lez?= Date: Sun, 6 Mar 2022 21:19:33 +0100 Subject: [PATCH 3/5] use correct setting path fixes #73 --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 46d009b..0c3f659 100644 --- a/README.rst +++ b/README.rst @@ -29,8 +29,8 @@ 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. +Please ensure that you have ``django.template.context_processors.request`` listed in the +``TEMPLATES[...]["OPTIONS"]["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`` From 81692b35915f667ddcfb79d05cb1f9ace7259300 Mon Sep 17 00:00:00 2001 From: Nikita Karamov Date: Sat, 7 May 2022 17:03:47 +0200 Subject: [PATCH 4/5] Update README - simplify wording - add missing badges - enforce `django-simple-menu` name everywhere --- README.rst | 93 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 58 insertions(+), 35 deletions(-) diff --git a/README.rst b/README.rst index 0c3f659..3b53d67 100644 --- a/README.rst +++ b/README.rst @@ -1,61 +1,84 @@ -Simple Django Menus -=================== +=================================== +django-simple-menu |latest-version| +=================================== -.. image:: https://github.com/jazzband/django-simple-menu/workflows/Test/badge.svg +|jazzband| |build-status| |coverage| |docs| |python-support| |django-support| + +.. |latest-version| image:: https://img.shields.io/pypi/v/django-simple-menu.svg + :target: https://pypi.python.org/pypi/django-simple-menu + :alt: Latest version on PyPI + +.. |jazzband| image:: https://jazzband.co/static/img/badge.svg + :target: https://jazzband.co/ + :alt: Jazzband + +.. |build-status| image:: https://github.com/jazzband/django-simple-menu/actions/workflows/test.yml/badge.svg :target: https://github.com/jazzband/django-simple-menu/actions - :alt: GitHub Actions + :alt: Build Status -.. image:: https://img.shields.io/codecov/c/github/jazzband/django-simple-menu.svg - :target: https://codecov.io/github/jazzband/django-simple-menu +.. |coverage| image:: https://img.shields.io/codecov/c/github/jazzband/django-simple-menu.svg + :target: https://codecov.io/github/jazzband/django-simple-menu + :alt: Test coverage status -.. image:: https://img.shields.io/pypi/v/django-simple-menu.svg - :target: https://pypi.python.org/pypi/django-simple-menu - :alt: Latest PyPI version +.. |docs| image:: https://img.shields.io/readthedocs/django-simple-menu/latest.svg + :target: https://django-simple-menu.readthedocs.io/ + :alt: Documentation status -.. image:: https://jazzband.co/static/img/badge.svg - :target: https://jazzband.co/ - :alt: Jazzband +.. |python-support| image:: https://img.shields.io/pypi/pyversions/django-simple-menu + :target: https://pypi.python.org/pypi/django-simple-menu + :alt: Supported Python versions -django-simple-menu is an entirely code based menu system, because, who really wants to define their -menus in the django admin... +.. |django-support| image:: https://img.shields.io/pypi/djversions/django-simple-menu + :target: https://pypi.org/project/django-simple-menu + :alt: Supported Django versions -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. +``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 ---------- -Using django-simple-menu is easy. +**Requirements:** Python 3.6+, Django 2.2+ + +1. Install the ``django-simple-menu`` package. + +2. Add ``menu`` to your ``INSTALLED_APPS``. -Install ``django-simple-menu`` in your virtualenv and then add ``menu`` to your ``INSTALLED_APPS``. -Please ensure that you have ``django.template.context_processors.request`` listed in the -``TEMPLATES[...]["OPTIONS"]["context_processors"]`` setting. + - please ensure that you have ``django.template.context_processors.request`` + listed under ``TEMPLATES[...]["OPTIONS"]["context_processors"]``. -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. +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 ``menu`` namespace. -In a template you want to render a menu first ``{% load menu %}`` then call ``{% generate_menu %}`` -inside a block and a new variable named ``menus`` will be added to the context. You can now iterate -over this ``menus`` object to render your menus. +4. In your templates, load the template tags (``{% load 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 everything in action and evaluate django-simple-menu please check out the +To quickly see ``django-simple-menu`` in action, check out the `example project`_. .. _example project: https://github.com/jazzband/django-simple-menu/tree/master/example -Documentation -------------- +More +---- -The full documentation is located in the docs directory and can be viewed at: +Full documentation, including installation and configuration instructions, is +available at https://django-simple-menu.readthedocs.io/. -https://django-simple-menu.readthedocs.org +``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 and was further developed by many +contributors_. -Requirements ------------- +.. _contributors: https://github.com/jazzband/django-simple-menu/graphs/contributors -Django 2.2+ -Python 3.6+ From e7ad8c087939e4ce23b099b19fa09871f5b3537a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 8 May 2022 17:28:36 +0000 Subject: [PATCH 5/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- README.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/README.rst b/README.rst index 3b53d67..2bd00e7 100644 --- a/README.rst +++ b/README.rst @@ -81,4 +81,3 @@ Evan Borgstom and was further developed by many contributors_. .. _contributors: https://github.com/jazzband/django-simple-menu/graphs/contributors -