@@ -15,22 +15,39 @@ Simple Django Menus
15
15
:target: https://pypi.python.org/pypi/django-simple-menu
16
16
:alt: Number of PyPI downloads
17
17
18
- django-simple-menu is an entirely code based menu system, because, who
19
- really wants to define their menus in the django admin...
18
+ django-simple-menu is an entirely code based menu system, because, who really wants to define their
19
+ menus in the django admin...
20
20
21
- It's simple to use, yet provides enough flexibility to provide unlimited
22
- children menus, per-request generation and checking of menu items, badges,
23
- and more.
21
+ It's simple to use, yet provides enough flexibility to provide unlimited children menus, per-request
22
+ generation and checking of menu items, badges, and more.
23
+
24
+
25
+ Quickstart
26
+ ----------
27
+
28
+ Using django-simple-menu is easy.
29
+
30
+ Install ``django-simple-menu `` in your virtualenv and then add ``menu `` to your ``INSTALLED_APPS ``.
31
+ Please ensure that you have ``django.core.context_processors.request `` listed in the
32
+ ``TEMPLATE_CONTEXT_PROCESSORS `` setting.
33
+
34
+ For each of your own apps that you want to expose a menu create a new file named ``menus.py `` and
35
+ define your menus using the ``Menu `` and ``MenuItem `` classes.
36
+
37
+ In a template you want to render a menu first ``{% load menu %} `` then inside a block call
38
+ ``{% generate_menu %} `` and a new varaible named ``menus `` will be added to the context. You can
39
+ now iterate over this ``menus `` object to render your menus.
24
40
25
- It was built from scratch over the past 3 years as part of an internal
26
- system after we were not satisifed by all of the existing menu apps.
27
41
28
42
Documentation
29
43
-------------
30
- The documentation is located in the docs directory and can be viewed at:
44
+
45
+ The full documentation is located in the docs directory and can be viewed at:
31
46
32
47
https://django-simple-menu.readthedocs.org
33
48
49
+
34
50
Requirements
35
51
------------
52
+
36
53
Django 1.3+
0 commit comments