Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cat site/register/forms.py
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- from registration.forms import RegistrationForm
- from django import forms
- class UserRegistrationForm(RegistrationForm):
- #unique_id = forms.CharField(min_length=12,max_length=12,label=("Unique id"))
- user = models.ForeignKey(User, unique=True)
- url = models.URLField("Website", blank=True)
- company = models.CharField(max_length=50, blank=True)
- settings.py
- AUTH_PROFILE_MODULE = "account.UserProfile"
- ./manage.py shell
- Python 2.7.3 (default, Mar 22 2013, 00:04:12)
- [GCC 4.6.3] on linux2
- Type "help", "copyright", "credits" or "license" for more information.
- (InteractiveConsole)
- >>> from registration.forms import RegistrationForm
- >>> f = RegistrationForm()
- >>> print f
- <tr><th><label for="id_username">Username:</label></th><td><input id="id_username" type="text" class="required" name="username" maxlength="30" /></td></tr>
- <tr><th><label for="id_email">E-mail:</label></th><td><input id="id_email" type="text" class="required" name="email" maxlength="75" /></td></tr>
- <tr><th><label for="id_password1">Password:</label></th><td><input id="id_password1" type="password" class="required" name="password1" /></td></tr>
- <tr><th><label for="id_password2">Password (again):</label></th><td><input id="id_password2" type="password" class="required" name="password2" /></td></tr>
Advertisement
Add Comment
Please, Sign In to add comment