#17795: kwargs not passed on by django.views.generic.edit import ProcessFormView -------------------------------------+------------------------------------- Reporter: ed.crewe@… | Owner: Fandekasp Type: | Status: new Cleanup/optimization | Version: master Component: Generic views | Resolution: Severity: Normal | Triage Stage: Accepted Keywords: | Needs documentation: 1 Has patch: 1 | Patch needs improvement: 0 Needs tests: 0 | UI/UX: 0 Easy pickings: 1 | -------------------------------------+-------------------------------------
Comment (by mjtamlyn): I want to -1 this change. URL keyword arguments are not context data. IMO the behaviour of TemplateView is wrong here, and has bitten me before where I've had to change my urlconf. For a concrete exple of why this is bad, consider the situation where I have a URL pointing to a form view which renders different forms depending on the url. Then I call that URL kwarg 'form' and this code breaks. The correct place to add things to the context is in get context data, not by arbitrarily adding all URL kwargs to the context in all views. This patch would break existing running code for me. As an aside, note that view is put into the context now, so if you really want to you can access the URL kwargs as view.kwargs -- Ticket URL: <https://code.djangoproject.com/ticket/17795#comment:17> 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 unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/077.a53fc740e5c4b924747eada91e4fd7a5%40djangoproject.com. For more options, visit https://groups.google.com/groups/opt_out.