Commits

James Bennett committed ec25dfb

Aforementioned code change.

Comments (0)

Files changed (3)

registration/backends/default/__init__.py

         user registration.
         
         """
-        return 'registration_complete'
+        return ('registration_complete', (), {})

registration/tests/backends.py

 
         """
         self.assertEqual(self.backend.post_registration_redirect(_mock_request(), User()),
-                         'registration_complete')
+                         ('registration_complete', (), {}))
 
     def test_registration_signal(self):
         """

registration/views.py

         form = form_class(data=request.POST, files=request.FILES)
         if form.is_valid():
             new_user = backend.register(request, **form.cleaned_data)
-            return redirect(success_url or backend.post_registration_redirect(request, new_user))
+            if success_url is None:
+                to, args, kwargs = backend.post_registration_redirect(request, new_user)
+                return redirect(to, *args, **kwargs)
+            else:
+                redirect(success_url)
     else:
         form = form_class()