Commits

Waldemar Kornewald  committed 535feb9

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

  • Participants
  • Parent commits 05d297f

Comments (0)

Files changed (1)

File 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):
     """