#17648: Allow `ContentTypeManager` and `GenericForeignKey` to retreive/store 
proxy
model content type.
-------------------------------------+-------------------------------------
     Reporter:  charettes            |                    Owner:  charettes
         Type:  Bug                  |                   Status:  new
    Component:                       |                  Version:  SVN
  contrib.contenttypes               |               Resolution:
     Severity:  Normal               |             Triage Stage:  Design
     Keywords:  contenttype proxy    |  decision needed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by akaariai):

 * cc: anssi.kaariainen@… (added)


Comment:

 The problem why the proxy_for_model method fails is that the
 proxy_for_model does not generate a proxy chain, as is mistakenly assumed
 in multiple parts of the code. proxy_for_model references the concrete
 model. So in case you have deferred proxy, proxy_for_model references the
 concrete model, not the proxy. Fixing the proxy_for_model to actually be
 an chain would be wise, as this is at least the fifth ticket where I have
 seen problems caused by it.

 I don't particularly like the `__bases__`[0] thing in your patch. It would
 be better to fix the proxy_for_model setup to actually produce a proxy
 chain...

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17648#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

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

Reply via email to