1
0
mirror of https://github.com/django/django.git synced 2025-10-25 06:36:07 +00:00

[1.1.X] Fixed #5034 -- honor request.urlconf in reverse and resolve.

This enables {% url %} to honor request.urlconf set from process_request
middleware methods.

Thanks SmileyChris for the initial patch work.

Backport of [11740] from trunk

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@11741 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Brian Rosner
2009-11-16 01:59:54 +00:00
parent 7f2f6bc863
commit 4cba436269
7 changed files with 154 additions and 47 deletions

View File

@@ -0,0 +1,7 @@
from django.core.urlresolvers import set_urlconf
import urlconf_inner
class ChangeURLconfMiddleware(object):
def process_request(self, request):
request.urlconf = urlconf_inner.__name__