Django Category
Simple category app providing category and tag models.
Requirements
Python 2.7, 3.5-3.7
Django 1.11, 2.0, 2.1
Installation
Install or add django-category to your Python path.
Add category to your INSTALLED_APPS setting.
This package uses django’s internal sites framework. Add django.contrib.sites to your INSTALLED_APPS setting and include the required SITE_ID = 1 (or similiar). The official docs can be found here: https://docs.djangoproject.com/en/2.1/ref/contrib/sites/.
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
next
String representation for Python 3.
2.0.1
Django 2.1 support. The minimum supported Django version is now 1.11.
Added coveralls
2.0.0
Django 2 support. The minimum supported Django version is now 1.10.
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.
Metadata
Release files for django-category 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-category-2.0.1.tar.gz | 14.4 kB | Without provenance | Details for django-category-2.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_category-2.0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for django_category-2.0.1-py2.py3-none-any.whl |
Total release size: 42.6 kB
Release files / django-category-2.0.1.tar.gz
| Download URL | django-category-2.0.1.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef1416843777ae1ac4ca7eed70efeff5d547f3f5ca5c2e967935552b52d81da4
|
|
BLAKE2b-256 checksum How to use checksums |
e5270c5efd29fdcdc5bcc847fda9e402d35f6feb527ae21e683dd694cc36bdcf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5
|
Release files / django_category-2.0.1-py2.py3-none-any.whl
| Download URL | django_category-2.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 28.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
50d19b6bd655f4e4057bfc94f7e57e1e77d738e77d7172ee2f16ce5cb5aed148
|
|
BLAKE2b-256 checksum How to use checksums |
7188febbc335e8cd1383270a6ead7508f4ae54e1d2000decca2e93bb1e18a718
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5
|
Security for django-category 2.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.