Changes between Initial Version and Version 5 of Ticket #24689
- Timestamp:
- Apr 23, 2015, 10:15:49 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #24689
- Property Summary DetailView & ListView get_template_name fails with deferred QuerySet → DetailView get_template_name and get_context_object_name fail with deferred QuerySet
- Property Easy pickings unset
- Property Triage Stage Unreviewed → Accepted
- Property Has patch set
- Property Needs tests set
-
Ticket #24689 – Description
initial v5 14 14 This is because Django creates a proxy model each time you use defer/only. And therefore {{{User.objects.defer('password')[0]._meta.model_name}}} is {{{'user_deferred_password'}}}. 15 15 16 {{{ (DetailView|ListView).get_template_name}}} should ckeck if {{{model._deferred}}} and use {{{model._meta.proxy_for_model}}} to get the original model.16 {{{DetailView.get_template_name}}} should ckeck if {{{model._deferred}}} and use {{{model._meta.proxy_for_model}}} to get the original model.