On Mon, Feb 7, 2011 at 3:43 PM, Ian Stokes-Rees
<ijsto...@hkl.hms.harvard.edu> wrote:
> On 2/7/11 3:38 PM, Shawn Milochik wrote:
>> Is your base model abstract? If it is not, then the ORM will want to
>> create it in the database.
>
> No, it isn't abstract.  It has a particular content model and methods
> associated with it.  When you say the ORM will "want" to create it in
> the DB, do you mean:
>
> 1. It should figure this out on its own and create the base model table; or
> 2. The ORM needs this so it must be listed in INSTALLED_APPS to have the
> relevant table created in the DB.
>


It's definitely #2. Because when the model isn't abstract, the fields
in the base model aren't created for the subclass -- the subclass has
a foreign key to an instance of the base model.
That last bit should explain why you need to have the base app in
installed apps.

Shawn

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