System needs to types of categories. First one is used by all. Second
one is created by author.
In admin on new Entry I would like tu see all items from Category
and in AuthorCategory would like to see AuthorCategory items where
User is current user.
from django.contrib.auth.models import User
class AuthorCategory(models.Model):
title = models.CharField(max_length=250)
author = models.ForeignKey(User)
class Category(models.Model):
title = models.CharField(max_length=250)
class Entry(models.Model):
title = models.CharField(max_length=250)
category = models.ForeignKey(Category)
authorcategory = models.ForeignKey(AuthorCategory)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django 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/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---