A django app with an abstract model which helps to define tree style categories with unlimited sub levels
Project description
========
CategoryTree
========
This is a simple Django apllication that provide an abstract class to create a tree style category model.
Using this model we can define unlimited number of sublevel categories only by one model class.
Installation
============
Install the application package using pip::
pip install django-categorytree
add 'categorytree' to the INSTALLED_APPS list on your settings file
How to use
==========
Import the Category abstract model from categorytree and use it to create your category model::
from lcategorytree.models import Category
class MyCategoryModel(Category):
pass
In your application admin.py file mport the CategoryAdmin abstract ModelAdmin class and use it to register your model to the admin site::
from categorytree.admin import CategoryAdmin
class MyCategoryAdmin(CategoryAdmin):
class Meta:
model = MyCategoryModel
CategoryTree
========
This is a simple Django apllication that provide an abstract class to create a tree style category model.
Using this model we can define unlimited number of sublevel categories only by one model class.
Installation
============
Install the application package using pip::
pip install django-categorytree
add 'categorytree' to the INSTALLED_APPS list on your settings file
How to use
==========
Import the Category abstract model from categorytree and use it to create your category model::
from lcategorytree.models import Category
class MyCategoryModel(Category):
pass
In your application admin.py file mport the CategoryAdmin abstract ModelAdmin class and use it to register your model to the admin site::
from categorytree.admin import CategoryAdmin
class MyCategoryAdmin(CategoryAdmin):
class Meta:
model = MyCategoryModel
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file django_categorytree-0.1.tar.gz
.
File metadata
- Download URL: django_categorytree-0.1.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
753edf60438ff97fc9ded1e357ad57f36d3df2e0f3d72e95dfeeff2895845cdb
|
|
MD5 |
fd4fc41547ca5d8294bd534045db6bda
|
|
BLAKE2b-256 |
82516d0504fbeffb623a98f7f1a53e04b2c702e91dde0b68ea94cba4053c52ac
|
File details
Details for the file django_categorytree-0.1.2.tar.gz
.
File metadata
- Download URL: django_categorytree-0.1.2.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
3efcb06f8cae300f3ef904f1e9e94f1a6b237331825b6e33aa6140dc77ec3c50
|
|
MD5 |
9dab69eb3f102d3c3860693e536c3f85
|
|
BLAKE2b-256 |
2d5e3070d1781e8a83d3fe8cf7452d6a67ab6c87e42d3b0ce19c2b6eed47bd48
|
File details
Details for the file django_categorytree-0.1.1.tar.gz
.
File metadata
- Download URL: django_categorytree-0.1.1.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
ff9a7aff41d513535dc16984d650b396c7f5beaef0a2cf0e75268e7636f3c247
|
|
MD5 |
e049407a35d946dcb22b2f7511522035
|
|
BLAKE2b-256 |
d8d1fbc79a753019ca21c4f511d27bd7b4ce0cc8af1dd223d94fcb8b4fffb825
|