| from django import forms
from django.forms import ModelForm
from django.contrib.auth.forms import UserCreationForm, AuthenticationForm
from .models import User, Profile
class SignUpFormUser(UserCreationForm):
#date_of_birth = forms.DateField(help_text='Format: YYYY-MM-DD')
#full_name = forms.TextField(max_length=1000)
#preferred_name = forms.TextField(max_length=500)
class Meta:
model = User
fields = ('email', 'full_name', 'preferred_name', 'password1', 'password2', )
class SignUpFormProfile(ModelForm):
class Meta:
model = Profile
fields = ('date_of_birth',)
class LogInForm(AuthenticationForm):
class Meta:
model = User
fields = ('email', 'password1', )
#fields = '__all__'
|
Pasted 6 days, 8 hours ago —
Expires in 1 day
URL: http://dpaste.com/3ZRXMQP