src/cm/views/user.py
changeset 285 1070d52adc11
parent 281 b7514e31251b
child 311 459e30951aa2
--- a/src/cm/views/user.py	Thu Jul 15 16:54:29 2010 +0200
+++ b/src/cm/views/user.py	Thu Jul 15 16:55:31 2010 +0200
@@ -544,8 +544,12 @@
     
     display_message(request, _(u"You're logged in!"))
     next = request.POST.get('next', None)
+    q = request.POST.get('q', None)
     if next and next.startswith('/'):
-        return HttpResponseRedirect(next)
+        if q:
+            return HttpResponseRedirect(next + '?' + q)
+        else:
+            return HttpResponseRedirect(next)
     else:
         return HttpResponseRedirect(reverse('index'))