saving works now

This commit is contained in:
2024-12-29 03:44:52 +01:00
parent 4d27a84907
commit 4a70d1f571
73 changed files with 18361 additions and 2 deletions

30
backend/accounts/forms.py Normal file
View File

@@ -0,0 +1,30 @@
from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
class SignupForm(UserCreationForm):
first_name = forms.CharField(
label='Nome',
max_length=30,
required=False,
widget=forms.TextInput(attrs={'autofocus': 'autofocus'})
)
last_name = forms.CharField(label='Sobrenome', max_length=30, required=False) # noqa E501
username = forms.CharField(label='Usuário', max_length=150)
email = forms.CharField(
label='E-mail',
max_length=254,
help_text='Requerido. Informe um e-mail válido.',
)
class Meta:
model = User
fields = (
'first_name',
'last_name',
'username',
'email',
'password1',
'password2'
)