IdHub/idhub/admin/forms.py
Cayo Puigdefabregas d9ec205c4e add services
2023-10-17 15:49:56 +02:00

24 lines
490 B
Python

from django import forms
from django.contrib.auth.models import User
class ProfileForm(forms.ModelForm):
MANDATORY_FIELDS = ['first_name', 'last_name', 'email', 'username']
class Meta:
model = User
fields = ('first_name', 'last_name', 'email')
class MembershipForm(forms.ModelForm):
MANDATORY_FIELDS = ['type']
class RolForm(forms.ModelForm):
MANDATORY_FIELDS = ['name']
class ServiceForm(forms.ModelForm):
MANDATORY_FIELDS = ['domain', 'rol']