Add: basic forms for UserProfile/User options
This commit is contained in:
parent
efe260f7c1
commit
61f524c685
1 changed files with 13 additions and 0 deletions
13
archivist/apps/user/forms.py
Normal file
13
archivist/apps/user/forms.py
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
from django import forms
|
||||||
|
from django.contrib.auth.models import User
|
||||||
|
from .models import UserProfile
|
||||||
|
|
||||||
|
class UserProfileForm(forms.ModelForm):
|
||||||
|
class Meta:
|
||||||
|
model = UserProfile
|
||||||
|
fields = ['show_mature', "items_per_page"]
|
||||||
|
|
||||||
|
class UserForm(forms.ModelForm):
|
||||||
|
class Meta:
|
||||||
|
model = User
|
||||||
|
fields = ['username', 'email', 'first_name', 'last_name'] # Include any other user fields you want
|
Loading…
Reference in a new issue