Skip to content

Django template tag which draws a tree-like menu in your page

Notifications You must be signed in to change notification settings

IsAyka1/draw-menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

draw_menu

Django template tag which draws a tree-like menu in your page

How to use

  • 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

About

Django template tag which draws a tree-like menu in your page

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages