1. Nicolas Kuttler
  2. django-registration


Nicolas Kuttler  committed 06198de

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

  • Participants
  • Parent commits 27bccd1
  • Branches default

Comments (0)

Files changed (1)

File registration/views.py

View file
 def register(request, backend, success_url=None, form_class=None,
-             extra_context=None):
+             extra_context=None,
+             form_context='form'):
     Allow a new user to register an account.
         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[key] = callable(value) and value() or value
     return render_to_response(template_name,
-                              {'form': form},
+                              {form_context: form},