Coder Social home page Coder Social logo

django-menu's Introduction

django-menu

Demo video on how to run the test

https://pan.baidu.com/s/1eSs6UNw

Environment

$ virtualenv --python=python2.7 --no-site-packages ENV

$ source ENV/bin/activate

$ pip install -r requirements.txt

How to test

$ cd menu

prepare the db

$ ./manage.py makemigrations

$ ./manage.py migrate

create admin user and start the dev server

$ ./manage.py createsuperuser

$ ./manage.py runserver

Notices

  • Notice 1: if you want the demo code show the menu you added, please use 'example' as the menu_name
  • Notice 2: use absolute path as link, to make testing simpler. for example: /category/coders
  • Notice 3: the order_weight field is for ordering the menu items

Ready to go

After inserting some menu items in admin, you can display it by visiting: http://localhost:8000/

How to use the template tag?

To use the tag in your app, you can write template like this:

{% load menu %}

{% draw_menu 'example' %}

django-menu's People

Contributors

leefurong avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.