Thursday, December 29, 2011

Re: Constraints on a one-to-many relationship and related problems

At 2011-12-28 06:59:31 -0800, Jay De Lanoy wrote:
> I'd go for a separate table instead, with something like
> class BillingInfo(models.Model):
> customer = models.OneToOneField(Customer)
> billing_address = models.OneToOneField(Address)
> and then just have logic in the views and templates to account for
> existence/nonexistence of a given customer's billing address.

Would this approach mean implementing my own forms to populate
customers and addresses and not using the built-in Django admin forms
at all? They were a major draw for me to Django.



You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment