On Thu, Mar 3, 2011 at 10:07 AM, Craig de Stigter <craig...@gmail.com> wrote:
> I realise everyone's been busy with getting 1.3 ready, but doesn't anyone
> have thoughts on this? It's been two weeks ...

Hi Craig,

Thanks for the suggestion. As you've noted, we've been busy with the
1.3 release, which has been consuming a lot of the core team's time.
Sometimes posts fall between the cracks; your post is one such victim.

The other reason that you haven't got much traction is that this isn't
the first time your idea has been proposed. In fact, this suggestion
one of the design options on the table at the time that model
inheritance was originally proposed. It was rejected at the time on
the grounds that it was too much overhead to impose on a general
inheritance solution (i.e., DB columns aren't free, and many
applications of inheritance don't require the extra column). Search
django-dev for "CORBA narrow" for the full discussion and reasoning.

Since then, a couple of people have addressed this issue using mixins;
this enables you to get the subclassing+narrowing goodness by simply
annotating a class heirarchy. django_polymorphic (given in another
reply) is one such example; there are others.

Personally, I'd eventually like to see a contrib package that
contained extensions like this -- polymorphic models, tree
implementations and so on -- model extensions to represent common data
usage patterns. Ideally, this contrib app would be developed in the
same way that contrib.messages was handled -- a small team doing a
survey of the community to find all the model extensions like this
that exist (e.g., mptt, treebeard, polymorphic, and so on), and
pulling them together into a single project that covers all the use
cases spanned by each individual project. Then, once a single spanning
implementation exists (and is documented, tested, etc), it could be
proposed for inclusion in trunk.

Yours,
Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to