123456789101112131415161718 |
- from django import forms
- from djadhere.utils import StringWidget
- from .models import Adhesion, Corporation, User
- class UserCreationForm(forms.ModelForm):
- class Meta:
- model = User
- fields = ('first_name', 'last_name', 'username', 'email')
- def __init__(self, *args, **kwargs):
- super().__init__(*args, **kwargs)
- self.fields['first_name'].required = True
- self.fields['last_name'].required = True
- self.fields['username'].required = False
|