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 "
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 g
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 me
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 methods
> associated with it. W
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 ap
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 f
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 elsewhere:
>
> derived/models.py:
>
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 w
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 on your system, you add the 'b
9 matches
Mail list logo