Django Stories 1.0.8 documentation
Install django-categories
$ pip install django-categories
Note
Stories
requires django-categories
version >= 1.1.2
Add categories
to your INSTALLED_APPS
setting.
INSTALLED_APPS = ( ... 'categories', ... )
Supply the fields you want to be added to the Story
model.
CATEGORIES_SETTINGS = { ... 'FK_REGISTRY': { 'stories.story': { 'name': 'primary_category', 'related_name': 'primary_category' } }, 'M2M_REGISTRY': { 'stories.story': { 'name': 'categories', 'related_name': 'categories' } } ... }In this case, 2 fields are setup, one
ForeignKey
field called primary_category and oneManyToMany
field called categories
Sync your database
$ ./manage.py syncdbor if your using
South
$ ./manage.py syncdb --migrate