Alan Green wrote:
> Sure. In this case you would need a discriminator attribute on Place.
[...]
> I'd be pleased to see Django require discriminator attributes on
> superclasses, and then automagically retrieve the correct subclasses
> at the correct times. It seems to work well enough in ORMs such as
> Hibernate. However, I think I could happily live with Malcolm's
> proposal too, even if it means writing code like the above every
> now-and-then.

Yes, I'm worried that needing polymorphism is the common case, and if
it's not blatantly obvious how to do it, people are going to get
frustrated, especially if they're used to it working in other ORMs.
They're attracted to Python and Django for certain characteristics, and
it'll be a bit of a let-down, that's all.

So, I understand the technical challenges, and that the design is the
most generic and optimized possible, and many people will appreciate
this as well.  All I'm saying this Alan's descriptor solution better be
a Best Practice side note in the docs if it's not an option of the
framework itself :)

Rgds,
Bjorn


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to