added user profile page
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from django import forms
|
||||
from django.contrib.auth.forms import UserCreationForm
|
||||
from django.contrib.auth.models import User
|
||||
from .models import Item
|
||||
from .models import Item, UserProfile
|
||||
|
||||
|
||||
class SignupForm(UserCreationForm):
|
||||
@@ -54,3 +54,16 @@ class ItemForm(forms.ModelForm):
|
||||
cleaned_data['watched'] = None
|
||||
cleaned_data['duration_minutes'] = None
|
||||
return cleaned_data
|
||||
|
||||
|
||||
class ProfileForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = UserProfile
|
||||
fields = ['display_name', 'theme']
|
||||
widgets = {
|
||||
'display_name': forms.TextInput(attrs={'placeholder': 'Your full name (optional)'}),
|
||||
}
|
||||
labels = {
|
||||
'display_name': 'Display name',
|
||||
'theme': 'Theme',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user