Heirarchical categories/taxonomies for your Django project
Project description
# Aldryn Categories
Aldryn Categories is a simple project that provides hierarchical categories as an independent model in your project. Categories are similar to tags, but are structured into a taxonomy. The project is suitable for I18N projects as Categories are fully translatable.
### Dependencies/Support
Python v2.7+
Django v1.6.x + South v1.0.2 or Django v1.7+
django-treebeard v2.0+
django-parler v1.2.1+
## Installation & Usage
To use Aldryn Categories, install the package with either:
pip install aldryn-categories
Or directly from the GitHub repository with:
pip install https://github.com/aldryn/aldryn-categories/archive/master.zip
Next, add aldryn_categories to your INSTALLED_APPS.
Now, add a CategoryManyToManyField to aldryn_categories.Category on any models you wish to categorize, like so:
# -- coding: utf-8 --
from django.db import models from aldryn_categories.fields import CategoryManyToManyField
- class Thing(models.Model):
my_field = models.CharField(…) … categories = CategoryManyToManyField(‘aldryn_categories.Category’)
This usage of the CategoryManyToManyField simply allows your categories to be displayed heirarchically in the otherwise normal MultipleSelectWidget like so:
![](diagrams/category-widget-preview.png?raw=true)
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
File details
Details for the file aldryn-categories-0.1.0.tar.gz
.
File metadata
- Download URL: aldryn-categories-0.1.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13e345e07cf478d38989d150f2f9e4c23b4595afb6ae9ae50fa5619228d4d2b0 |
|
MD5 | f6954579fb66c18968b44e8d98c6008b |
|
BLAKE2b-256 | 8579c1dfb33a6f47ebb9964c6bc03ee61f67c1d10cae0fcbaee6ac172d221e4e |