Skip to content

Commit

Permalink
Add documentation for related_views
Browse files Browse the repository at this point in the history
  • Loading branch information
Natureshadow committed Nov 16, 2020
1 parent 5806e8d commit c8e5df2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/menugeneration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Django Menu Generator uses python dictionaries to represent the menu items, usua
"url": URL spec,
"root": True | False,
"related_urls": [ list of related URLs ],
"related_views": [ list of related views ],
"validators": [ list of validators ],
"submenu": Dictionary like this
}
Expand All @@ -25,6 +26,8 @@ Where each key is as follows:

- ``related_urls``: If one of this URLs is part of the path on the currently opened page, the menu item will be marked as selected (format of URLs like described at :doc:`urls`)

- ``related_views``: If the currently opened page resolves to one of these views, the menu item will be marked as selected.

- ``root``: A flag to indicate this item is the root of a path, with this you can correctly mark nested menus as selected.

- ``validators``: See :doc:`validators`
Expand Down Expand Up @@ -89,4 +92,4 @@ With this feature you can have a project structure like this::
...

You can have a mix of the two approaches if you wish
You can have a mix of the two approaches if you wish

0 comments on commit c8e5df2

Please sign in to comment.