14 lines
418 B
Python
14 lines
418 B
Python
from django import forms
|
|
from django.contrib.auth.models import User
|
|
from django.contrib.auth.forms import UserCreationForm
|
|
|
|
|
|
class LoginForm(forms.Form):
|
|
username = forms.CharField(max_length=65)
|
|
password = forms.CharField(max_length=128, widget=forms.PasswordInput)
|
|
|
|
|
|
class RegisterForm(UserCreationForm):
|
|
class Meta:
|
|
model=User
|
|
fields = ['username','email','password1','password2']
|