This is the models.py for the relevant classes.
from django.db import models
from django.contrib.auth.models import User
from satchmo.product.models import Category
from django.utils.translation import ugettext_lazy as _
import config
class AuthorCategory(Category):
author = models.OneToOneField(User)
def _get_subtype(self):
return 'AuthorCategory'
class Admin:
pass
class Meta:
verbose_name = _('Author Category')
verbose_name_plural = _('Author Categories')
class BookCategory(Category):
parent = models.ForeignKey('AuthorCategory')
def _get_subtype(self):
return 'BookCategory'
class Admin:
pass
class Meta:
verbose_name = _('Book Category')
verbose_name_plural = _('Book Categories')
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Satchmo users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/satchmo-users?hl=en
-~----------~----~----~----~------~----~------~--~---