Commits

Waldemar Kornewald committed 535feb9

add current request's path to redirect (see RedirectMiddleware)

Comments (0)

Files changed (1)

djangotoolbox/middleware.py

                 request.path.startswith(NON_REDIRECTED_BASE_PATHS)):
             return
         if host not in settings.ALLOWED_DOMAINS:
-            return HttpResponseRedirect('http://' + settings.ALLOWED_DOMAINS[0])
+            return HttpResponseRedirect('http://' + settings.ALLOWED_DOMAINS[0]
+                                        + request.path)
 
 class NoHistoryCacheMiddleware(object):
     """