So the recommendation seems to be when your selection choices are not
static you should go ahead and use a Foreign Key relationship. You get
the automatic loading of the table into a select widget etc.

But there's this issue of the cascade on delete.

I have a Student model with a Foreign Key relationship to Teacher.
When a teacher is removed, so go the students. Too dangerous for my
particular scenario. There doesn't seem to be a Django feature that
allows for adjusting the cascade.

I thought to uncouple the relationship and use the Teacher model
strictly as a 'lookup table.'

What are best practices on this? What will I be losing if I just load
the teachers as 'choices' on the student forms? Is it worth creating
my own cascade protection to keep the Foreign Key relationship?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to