#16744: Class based view should have the view object in the context ---------------------------------------+------------------------------- Reporter: reinout | Owner: nobody Type: New feature | Status: new Milestone: | Component: Generic views Version: 1.3 | Severity: Normal Resolution: | Keywords: Triage Stage: Accepted | Has patch: 0 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | ---------------------------------------+-------------------------------
Comment (by jacob): Sounds like a good idea to me. I'd think Russ's second suggestion (`get_context_data` returning some sort of proxy object) is a bit too complex, but I do like having the view object be available as `{{ view }}` in the template. If anyone wants to work up a patch, one important part not to miss is a careful audit of all view methods for ones with side-effects; those should be marked as `alters_data` (https://docs.djangoproject.com/en/dev/ref/templates/api/#s-rendering-a-context). -- Ticket URL: <https://code.djangoproject.com/ticket/16744#comment:4> 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.