Skip to content

A django app with an abstract model which helps to define tree-style models with unlimited sub branches.

License

Notifications You must be signed in to change notification settings

payamnj/django-simpletree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django SimpleTree

Django SimpleTree is a simple Django application that provides an abstract class to create tree style models. Using this model we can define unlimited subbranches only by using one model class. It also provides a Django admin abstract class which helps to have a tree-style list in the admin site.

Admin View

Installation

Install the application package using pip:

pip install django-simpletree

add 'simpletree' to the INSTALLED_APPS list on your settings file

How to use

Import the Node abstract model from simpletree and use it to create your tree style model:

from simpletree.models import Node

class MyModel(Node):
    pass

In your application admin.py file import the NodeAdmin abstract ModelAdmin class and use it to register your model to the admin site:

from simpletree.admin import NodeAdmin


class MyAdmin(NodeAdmin):

    class Meta:
        model = MyModel

About

A django app with an abstract model which helps to define tree-style models with unlimited sub branches.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages