Hi,

I have a model Post, which has the following structure:

class Post(models.Model):
    body = models.TextField()
    arts = models.ForeignKey(Article, blank=True, null=True)
    pics = models.ForeignKey(Gallery, blank=True, null=True)

A post can be made from an article or a gallery or both. Is there
anywhere to add a constraint to force there to be either an article or
gallery associated with a post in the actual declaration of the model?

Many Thanks in advance,

Nathan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to