I have an address model with a 'country' field and a phone model with a
'country_code' field.
I would guess the right approach is to use choices for both fields so
the user can always select or change country in an address AND
country_code in a phone number.
However, I would like the selection of at least one to be automatic. If
an address record exists when creating a phone record the relevant
country_code should be inserted as a default.
Is there a way to sensibly do this with code in a model?
A related question - if django signals are a reasonable way to tackle
this, might it be better to write database triggers?
Thanks
Mike
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.