Re: Including apps for inherited models in INSTALLED_APPS

2011-02-08 Thread Shawn Milochik
On Tue, Feb 8, 2011 at 9:39 AM, Ian Stokes-Rees wrote: > I'm (reasonably) happy to include base models in INSTALLED_APPS, but > this argument: > > On 2/8/11 4:32 AM, Tom Evans wrote: >> Explicit is better than implicit. If you want models from app 'base' >> installed

Re: Including apps for inherited models in INSTALLED_APPS

2011-02-08 Thread Ian Stokes-Rees
I'm (reasonably) happy to include base models in INSTALLED_APPS, but this argument: On 2/8/11 4:32 AM, Tom Evans wrote: > Explicit is better than implicit. If you want models from app 'base' > installed on your system, you add the 'base' app to INSTALLED_APPS. > Otherwise, its a series of $MAGIC

Re: Including apps for inherited models in INSTALLED_APPS

2011-02-08 Thread Tom Evans
On Mon, Feb 7, 2011 at 8:28 PM, Ian Stokes-Rees wrote: > Does it make sense that inherited models also need their apps included in > INSTALLED_APPS?  Right now if I have: > > base/models.py: > > class MyBaseModel(django.db.models.Model): >    stuff > > and then

Re: Including apps for inherited models in INSTALLED_APPS

2011-02-07 Thread Shawn Milochik
Perhaps some deeper background will help: http://docs.djangoproject.com/en/1.2/ref/contrib/contenttypes/ 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

Re: Including apps for inherited models in INSTALLED_APPS

2011-02-07 Thread Ian Stokes-Rees
On 2/7/11 3:50 PM, Shawn Milochik wrote: > 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

Re: Including apps for inherited models in INSTALLED_APPS

2011-02-07 Thread Shawn Milochik
On Mon, Feb 7, 2011 at 3:43 PM, Ian Stokes-Rees 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

Re: Including apps for inherited models in INSTALLED_APPS

2011-02-07 Thread Ian Stokes-Rees
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

Re: Including apps for inherited models in INSTALLED_APPS

2011-02-07 Thread Shawn Milochik
Is your base model abstract? If it is not, then the ORM will want to create it in the database. 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

Including apps for inherited models in INSTALLED_APPS

2011-02-07 Thread Ian Stokes-Rees
Does it make sense that inherited models also need their apps included in INSTALLED_APPS? Right now if I have: base/models.py: class MyBaseModel(django.db.models.Model): stuff and then elsewhere: derived/models.py: class MyDerivedModel(base.MyBaseModel): stuff I need to include both