added registry, hacked admin w/ new templates for category editor

This commit is contained in:
Justin Quick 2010-01-28 05:17:01 -05:00
commit c6f269985e

11
categories/fields.py Normal file
View file

@ -0,0 +1,11 @@
from django.db.models import ForeignKey, ManyToManyField
from categories.models import Category
class CategoryM2MField(ManyToManyField):
def __init__(self, **kwargs):
super(CategoryM2MField, self).__init__(to=Category, **kwargs)
class CategoryFKField(ForeignKey):
def __init__(self, **kwargs):
super(CategoryFKField, self).__init__(to=Category, **kwargs)