12345678910111213141516171819 |
- from django import forms
- from django.contrib.auth.models import User
- from name_extractor.models import Staff
- from django.contrib.auth.forms import UserCreationForm
- class UserRegisterForm(UserCreationForm):
- email = forms.EmailField()
- class Meta:
- model = User
- fields = ['username', 'email', 'password1', 'password2']
- class StaffRegistrationForm(forms.ModelForm):
- class Meta:
- model = Staff
- fields = ['name', 'department', 'nick_names']
|