Skip to main content

Django categorize content app.

Project description

Django Category

Simple category app providing category and tag models.

Travis

Installation

  1. Install or add django-category to your Python path.

  2. Add category to your INSTALLED_APPS setting.

  3. If you are on Django < 1.7 then add south to your INSTALLED_APPS setting.

  4. 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.

Authors

Praekelt Foundation

  • Shaun Sephton

  • Jonathan Bydendyk

  • Hedley Roos

Changelog

1.9

  1. Actual unit tests.

  2. Compatibility from Django 1.6 to 1.9.

0.1.3

  1. __unicode__ method now returns a sensible result.

0.1.2

  1. Fix tree view.

0.1.1

  1. Added sites and subtitle fields.

0.1

  1. Dependency cleanup.

0.0.6

  1. Added get_absolute_url on Category

0.0.5

  1. Use prepopulate_fields for admin interface

  2. Parent category field added

  3. South migration path created

  4. Tree view of categories and tags

0.0.4 (2011-08-24)

  1. Docs, testrunner.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-category-1.9.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

django_category-1.9-py2.7.egg (22.2 kB view details)

Uploaded Source

File details

Details for the file django-category-1.9.tar.gz.

File metadata

File hashes

Hashes for django-category-1.9.tar.gz
Algorithm Hash digest
SHA256 70cd46b6cdc5f1e64662fed5a9a52ca8e422d0cede31a69831dec334a0b56eb5
MD5 8882328ef54a13a587765ee6316cda22
BLAKE2b-256 452ed27d60624e4bf7296e73afb4d0172416d51408b5d08f410f7e9bcf6dcb18

See more details on using hashes here.

Provenance

File details

Details for the file django_category-1.9-py2.7.egg.

File metadata

File hashes

Hashes for django_category-1.9-py2.7.egg
Algorithm Hash digest
SHA256 5b9b00856edbe1a3b294c62216c23b1f271d57bec3cbfbd55b7ce71d88c4c09c
MD5 807a1a31fdf03a6590da13ea62df6568
BLAKE2b-256 769be3f4b18cc9a5841ad7e0b222d72ce6365bcbfa777a496bbe1eedcd3ec3c0

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page