﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24127	Automatically set the current URL namespace based on the URL of the current request	Aymeric Augustin	Marten Kenbeek	"The [https://docs.djangoproject.com/en/dev/topics/http/urls/#reversing-namespaced-urls documentation on URL namespaces] shows the following example:

{{{
def render_to_response(self, context, **response_kwargs):
    self.request.current_app = self.request.resolver_match.namespace
    return super(DetailView, self).render_to_response(context, **response_kwargs)
}}}

`self.request.current_app = self.request.resolver_match.namespace` looks like something that makes sense in general and could be done automatically for all requests.

This became possible in Django 1.8 because `current_app` is now an attribute of the `request` object.

There are some fairly obvious backwards-compatibility concerns, but this change looks like it could save a lot of boilerplate code."	New feature	closed	Core (URLs)	dev	Normal	fixed	current_app	marten.knbk@…	Accepted	1	0	0	0	0	0
