Hello guys,

I have an application where I have the same information modeled at
different levels.  For instance two models I have are Course and
Offering.  An Offering has a foreign key to a Course.  I have a
boolean field 'manager_approval_required' at the course level right
now but I'd like the ability to override it on an Offering by Offering
basis.

So, my question... Is there a way to define the default value of
manager_approval_required field on the Offering model to be whatever
the value is on the Offering's Course instance?

This seems like it would be a common problem to try to model.  Having
your base classes with a bunch of defaults but models with foreign
keys to them would be able to override.

Any ideas?

I saw that the default parameter on fields can be a callable, but at
the time that it is called would the foreign key be available to query?
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to