On May 17, 5:38 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I've opened up a ticket 7252 [1] with patch, but I'm not sure my patch
> addresses the problem from the right angle, so if someone knows a
> better way to go about fixing it, I'd like to open the discussion here
> for better ways to fix this.

There's a similar ticket to this at 7154  (http://
code.djangoproject.com/ticket/7154). It has a patch that works but I
am not sure if it is the most elegant method.

> Essentially what's happening is that the manager is being inherited
> properly from the abstract model, but each manager has a reference to
> its parent model class, and that reference is not being updated.  My
> solution is to check in the descriptor if the calling model instance
> matches the manager's reference, and if it doesn't, assign it.  This
> feels flimsy, as we probably shouldn't have to make this check at
> all.
>
> As far as I can tell, this can't be done in ModelBase.__new__, as the
> reference is not yet set and therefore can't be checked.
>
> Thoughts? Suggestions?
>
> [1]http://code.djangoproject.com/ticket/7252

--
Cheers
Thejaswi Puthraya
http://thejaswi.info/
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to