Django template tag which draws a tree-like menu in your page
- install requirements from 'menu/'
pip install -r requirements.txt
- create superuser
su postgres -c psql postgres
psql-# ALTER USER admin WITH PASSWORD 'password';
- create db
psql-# CREATE DATABASE db_menu WITH OWNER admin;
- create migrations from 'menu/test_project/'
python3 manage.py makemigrations
python3 manage.py migrate
- load templatetags in your page
{% load draw_menu %}
- draw your menu by name in your page
<div class="some-class">
{% draw_menu 'main_menu' %}
</div>
You can use not-root 'name' then all menu will be drawn and node with 'name' will be selected
- run your project
python3 manage.py runserver