#17648: Allow `ContentTypeManager` and `GenericForeignKey` to retreive/store proxy model content type. -------------------------------------+------------------------------------- Reporter: charettes | Owner: charettes Type: Bug | Status: new Component: | Version: master 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 -------------------------------------+-------------------------------------
Comment (by charettes): I can't see how to break the patch the way you suggest since there's no ''issue'' with the deferred model handling until the `for_base_model` kwarg is introduced. It's not the case because in both scenarios (deferred concrete model and deferred proxy model) the code actually returns the `concrete_model` just like it always did (even before r17573). I suggest this approach. Creating a new ticket to add the kwarg to `get_for_model` (and `get_for_models`) defaulting to 1.4 behavior while handling the deferred model case correctly. With tests and doc. Fix #11154 and #17904 by using this new API. Then discuss here how `GenericForeignKey` and `GenericRelation` should behave with this new API. Should we add a `for_base_model` kwarg to `GenericForeignKey` and `GenericRelation`? Should they automatically use `for_base_model = False` or maybe just `GenericRelation` if the referenced model is a proxy? Maybe this is more appropriate for django-dev? -- Ticket URL: <https://code.djangoproject.com/ticket/17648#comment:15> 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.