<s> from django import forms <EOL> from django . contrib . auth . models import User <EOL> from django . contrib . auth . forms import ( AuthenticationForm , UserCreationForm , <EOL> SetPasswordForm ) <EOL> from django . utils . translation import ugettext as _ <EOL> from app . forms import Form , ModelForm <EOL> class LoginForm ( Form , AuthenticationForm ) : <EOL> pass <EOL> class CreateForm ( ModelForm , UserCreationForm ) : <EOL> username = forms . RegexField ( max_length = <NUM_LIT:30> , regex = r'<STR_LIT>' , <EOL> error_messages = { '<STR_LIT>' : _ ( "<STR_LIT>" ) } ) <EOL> class Meta : <EOL> model = User <EOL> fields = ( "<STR_LIT:username>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT:email>" ) <EOL> class EditForm ( ModelForm ) : <EOL> username = forms . CharField ( max_length = <NUM_LIT:30> ) <EOL> is_staff = forms . BooleanField ( required = False , label = _ ( "<STR_LIT>" ) ) <EOL> class Meta : <EOL> model = User <EOL> fields = ( "<STR_LIT:username>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT:email>" , "<STR_LIT>" ) <EOL> class PasswordForm ( Form , SetPasswordForm ) : <EOL> pass </s>
