From 61f524c685ceec3d60d1d99618bef34b45d309d1 Mon Sep 17 00:00:00 2001 From: Aroy-Art Date: Fri, 28 Jun 2024 21:35:29 +0200 Subject: [PATCH] Add: basic forms for UserProfile/User options --- archivist/apps/user/forms.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 archivist/apps/user/forms.py diff --git a/archivist/apps/user/forms.py b/archivist/apps/user/forms.py new file mode 100644 index 0000000..f8b73e3 --- /dev/null +++ b/archivist/apps/user/forms.py @@ -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 \ No newline at end of file