Heirarchical categories/taxonomies for your Django project
Project description
Aldryn Categories
Description
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+ (see note below) or Django v1.7+
django-treebeard v2.0+
django-parler v1.2.1+
If you’re using Django 1.6 with South and you cannot upgrade to version 1.0.3 or later, then try adding this to your settings:
MIGRATION_MODULES = { … 'aldryn_categories': 'aldryn_categories.south_migrations', … }
Installation & Usage
Aldryn Platform Users
Choose a site you want to install the add-on to from the dashboard.
Go to Apps -> Install App
Click Install next to Categories app.
Redeploy the site.
Manual Installation
Run pip install aldryn-categories. Or directly from the GitHub repository with: pip install https://github.com/aldryn/aldryn-categories/archive/master.zip
Add the following to your INSTALLED_APPS:
INSTALLED_APPS = [ … 'aldryn_categories', 'treebeard', … ]
Treebeard must be in your INSTALLED_APPS settings in order for the correct admin templates to be available.
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:
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 Distribution
Hashes for aldryn_categories-0.1.2-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 557e71bdd17742634352b3ee68137ec1726567465bc381ff187aa936cdca92eb |
|
MD5 | fa5288f282c5cf182cd050dbfc273b39 |
|
BLAKE2b-256 | 952d74b9de887cc8b8d1df04b7cebb78496cb7213a0a3caf0347493be3940d67 |