Hi, I want a project structure that is as follows:

I have an application with project model that has a subproject, and
that subproject has other subproject,etc. What I want to get is that
the subproject gets the same attributes that the parent project, but
is also able to override their values in its own instance (but not in
the parent instance).

My first idea is using something like a foreign key. This gives me
access to the parent values, but not the ability to override them.

The second option is multi-table inheritance from the parent class.
This gives me the parents class attributes, but I again I dont get the
fields in the admin, so Im not able to override them (at least not in
the admin). Is there any way to this?

The third option is to inherit an abstract class. The parent also
inherits from this class, so both have the fields I need. However, I
would like for the child class to inherit default values for this
fields from the parent class, but be free to override them. Is there
any way to pre-populate fields in the admin with the attribute values
from a parent or related files?

Thanks for your help.

-- 
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.

Reply via email to