Created
October 24, 2013 03:14
-
-
Save chriskief/7130728 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django import forms | |
from app.models import User | |
from app.forms.widgets import * | |
class RegisterBaseForm(forms.ModelForm): | |
username = forms.CharField(max_length=User._meta.get_field('username').max_length) | |
email = forms.CharField(max_length=User._meta.get_field('email').max_length, widget=HTML5EmailInput()) | |
password = forms.CharField(min_length=6, max_length=16, widget=forms.PasswordInput()) | |
class Meta: | |
model = User | |
fields = ('username', 'email', 'password') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment