#19624: Generic Detail View context contains object twice. -------------------------------------+------------------------------------- Reporter: mail@… | Owner: nobody Type: | Status: new Cleanup/optimization | Version: Component: Generic views | 1.5-beta-1 Severity: Normal | Resolution: Keywords: generic view | Triage Stage: Accepted Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by anonymous):
* needs_better_patch: => 0 * needs_docs: => 0 * needs_tests: => 0 * stage: Unreviewed => Accepted Comment: Setting self.object seems necessary and I don't see that as a problem. Having the same object in the context does seem unnecessary. What about adding a context_object_name attribute by default to BaseDetailView. ei: {{{ class BaseDetailView(SingleObjectMixin, View): context_object_name = 'object' }}} -- Ticket URL: <https://code.djangoproject.com/ticket/19624#comment:1> 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 https://groups.google.com/groups/opt_out.