Hallöchen!

Russell Keith-Magee writes:

> On Tue, Dec 21, 2010 at 8:33 PM, Torsten Bronger
> <bron...@physik.rwth-aachen.de> wrote:
>> Hallöchen!
>>
>> Marc Aymerich writes:
>>
>>> [...]
>>>
>>> Morgan, take a look at the inheritanceManager of this app:
>>> https://github.com/carljm/django-model-utils#readme
>>
>> Is anything like this planned for core Django?  It's the third or
>> forth time I see someone needing it.
>
> [...]
>
> At the time, we decided to omit support for 'narrowing' (to use
> the CORBA parlance) as part of the default feature set because it
> requires either:
>
>  a) table overhead to store the type of the child instance
>  b) an expensive query (or list of queries) that isn't obviously expensive.
>
> We weren't (and I'm still not) willing to impose either of these
> overheads by default.

I must clarify my use of "core Django" above.  Of course this may
well be realised in contrib/ as an optional feature.  However, I'd
love to see it in the Django release with explanations in the Django
docs.

> The good news is that either strategy is easy to implement without
> modifications to core. I've got several classes in production that do
> narrowing-like behavior (for the record, both using strategy (a)).

(a) is the way to go in my opinion.  I think the table overhead
itself is not so much of a problem but any migration of old
databases necessary due to it.  So, I understand that it cannot be
default behaviour.

> With a bit of extra effort, this should be easy to turn into a mixin
> that could be shared as part of a third-party support library, much as
> django-treebeard or django-mptt provide model support extensions
> implementing tree-like structures.

As somebody who has strugged with this problem for a along time and
having seen a couple of solutions along the road, I find
https://github.com/carljm/django-model-utils quite appealing and
finished.

Tschö,
Torsten.

-- 
Torsten Bronger, aquisgrana, europa vetus
                   Jabber ID: torsten.bron...@jabber.rwth-aachen.de
                                  or http://bronger-jmp.appspot.com

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