...
> Hi,
>
> I have a model which has a ForeignKey to the Django contrib sites.Site model. This field should be optional.
>
If it is optional it is not a foreign key. You can put a constraint on
the field to have a non-null value be present in the other table, and
perhaps there is a way to do this from a django model but I haven't
looked at that.
hth
- Tom
--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment