Commits

Nicolas Kuttler committed 06198de

Make it possible to configure the context variable for the registration form.

  • Participants
  • Parent commits 27bccd1

Comments (0)

Files changed (1)

File registration/views.py

 def register(request, backend, success_url=None, form_class=None,
              disallowed_url='registration_disallowed',
              template_name='registration/registration_form.html',
-             extra_context=None):
+             extra_context=None,
+             form_context='form'):
     """
     Allow a new user to register an account.
 
     ``template_name``
         A custom template to use. If not supplied, this will default
         to ``registration/registration_form.html``.
+
+    ``form_context``
+        The name of the environment variable the registration form will
+        use, defaults to ``form``.
     
     **Context:**
     
         context[key] = callable(value) and value() or value
 
     return render_to_response(template_name,
-                              {'form': form},
+                              {form_context: form},
                               context_instance=context)