0

So I am trying to alter one of the forms from Django-registration: an app I installed via pip.

As stated in the docs, I was to created a registration/registration_form.html and use form as my context:

<html>
<p>This is the registration form</p>
<ul>
{{ form.as_ul}}
</ul>
</html>

So I have 2 questions:

1) How am I to alter the form to have a submit button that actually works in this case?

2) How can I alter the django-registration models so that I can ultimately add more to the registration forms?

Yes I looked over the docs, I am asking here because the language confused me and seemed slightly advance for me.

Thank you!

ApathyBear
  • 9,057
  • 14
  • 56
  • 90

1 Answers1

1

You need to add the form tags and a submit button. Something like this:

<html>
  <p>This is the registration form</p>
  <form action="/url/to/register/" method="POST">
    {{form.as_ul}}
    <input type="submit" value="Register">
  </form>
</html>

where "/url/to/register/" will need to be pointed at your view code in your urls.py. Something like this:

from django.conf.urls import url, patterns
from yoursite.registrations import views

urlpatterns = patterns('',
    url(r'^url/to/register/', views.register_some_guy),
)
Max Murphy
  • 1,701
  • 1
  • 19
  • 29
  • Okay, but what if I want to change the form that django-registration is out-putting. Aka, I am looking for the forms.py in the registration app, but since I installed it via pip, I dont know where to find it or how to do alterations to it. – ApathyBear Mar 28 '14 at 02:10