Commits

James Bennett committed c79d544

Little bit of cleanup in the views.

Comments (0)

Files changed (1)

registration/views.py

     """
     backend = get_backend(backend)
     account = backend.activate(request, **kwargs)
+
     if account:
         if success_url is None:
             to, args, kwargs = backend.post_activation_redirect(request, account)
             return redirect(to, *args, **kwargs)
         else:
             return redirect(success_url)
+
     if extra_context is None:
         extra_context = {}
     context = RequestContext(request)
     for key, value in extra_context.items():
         context[key] = callable(value) and value() or value
+
     return render_to_response(template_name,
                               kwargs,
                               context_instance=context)
     Allow a new user to register an account.
 
     The actual registration of the account will be delegated to the
-    backend specified by the ``backend`` keywoard argument (see
-    below); it will be used as follows:
+    backend specified by the ``backend`` keyword argument (see below);
+    it will be used as follows:
 
     1. The backend's ``registration_allowed()`` method will be called,
        passing the ``HttpRequest``, to determine whether registration
         return redirect(disallowed_url)
     if form_class is None:
         form_class = backend.get_form_class(request)
+
     if request.method == 'POST':
         form = form_class(data=request.POST, files=request.FILES)
         if form.is_valid():
     context = RequestContext(request)
     for key, value in extra_context.items():
         context[key] = callable(value) and value() or value
+
     return render_to_response(template_name,
                               { 'form': form },
                               context_instance=context)