Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-tree

Installation

  1. Clone the repository:

    git clone https://github.com/TAnd-dev/django-tree.git
    cd django-tree
  2. Create and activate a virtual environment:

    python -m venv env
    source env/bin/activate  # On Windows, use `env\Scripts\activate`
  3. Install the dependencies:

    pip install django
  4. Apply migrations:

    python manage.py migrate
  5. Create a superuser:

    python manage.py createsuperuser
  6. Run the development server:

    python manage.py runserver

Usage

Upload ready data

  1. Run the following command to load the prepared data into the database:
     python manage.py loaddata tree.json 
  2. When you open http://127.0.0.1:8000/ you will see 2 trees

Admin Interface

  1. Open the admin interface at http://127.0.0.1:8000/admin/ and log in with your superuser account.
  2. Add a new Menu and MenuItem through the admin interface.

Template Tag

To render a menu on a page, load the custom template tag and use the draw_menu tag in your template:

{% load menu_tags %}

{% draw_menu 'main_menu' %}
'''

About

Tree menu maker app

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages