django/django — pull request #260 by GaretJax (2012-08-10 11:41:30+00:00)
Title: Save the instance namespace during the resolving process as a 'current_app' request attribute

RFF for this simple PR which adds a 'current_app' attribute to the HttpRequest class, defaulting to None.

During the URL resolving process, this attribute is set to the instance namespace of the resolved URL pattern so that it can be used in the middlewares or views without a second resolve call.

This PR also modified the render shortcut in order to use the newly introduced attribute as default value for the current_app argument.