Django categorize content app.
Project description
Django Category
Simple category app providing category and tag models.
Installation
Install or add django-category to your Python path.
Add category to your INSTALLED_APPS setting.
If you are on Django < 1.7 then add south to your INSTALLED_APPS setting.
Optional: django-object-tools provides a category tree view. See https://github.com/praekelt/django-object-tools for installation instructions.
Usage
Enable categorization and/or tagging on a model by creating ManyToMany fields to the models provided by django-category, for example:
from django import models class MyModel(models.Model): categories = models.ManyToManyField( 'category.Category', help_text='Categorize this item.' ) tags = models.ManyToManyField( 'category.Tag', help_text='Tag this item.' )
Models
class Category
Category model to be used for categorization of content. Categories are high level constructs to be used for grouping and organizing content, thus creating a site’s table of contents.
Category.title
Short descriptive title for the category to be used for display.
Category.subtitle
Some titles may be the same and cause confusion in admin UI. A subtitle makes a distinction.
Category.slug
Short descriptive unique name to be used in urls.
Category.parent
Optional parent to allow nesting of categories.
Category.sites
Limits category scope to selected sites.
class Tag
Tag model to be used for tagging content. Tags are to be used to describe your content in more detail, in essence providing keywords associated with your content. Tags can also be seen as micro-categorization of a site’s content.
Tag.title
Short descriptive name for the tag to be used for display.
Tag.slug
Short descriptive unique name to be used in urls.
Tag.categories
Categories to which the tag belongs.
Changelog
1.11.0
Compatibility for Python 3.5 and Django 1.11.
1.9
Actual unit tests.
Compatibility from Django 1.6 to 1.9.
0.1.3
__unicode__ method now returns a sensible result.
0.1.2
Fix tree view.
0.1.1
Added sites and subtitle fields.
0.1
Dependency cleanup.
0.0.6
Added get_absolute_url on Category
0.0.5
Use prepopulate_fields for admin interface
Parent category field added
South migration path created
Tree view of categories and tags
0.0.4 (2011-08-24)
Docs, testrunner.
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 django_category-1.11.0-py2.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | a850a87b9d33d0101fa55b8a6db974f2f4092e1695a4a1b99e5d614e8f3684c1 |
|
MD5 | 2d0eb29ef6c9d23d34048946fcdc178a |
|
BLAKE2b-256 | 99606ef46eeee69aaa8dacc89157af116c1447d9ad626506a2936265e6ca90a8 |