drought/users/form.py

21 lines
458 B
Python
Raw Normal View History

2018-12-29 01:11:57 +00:00
from django import forms
2018-12-29 06:49:25 +00:00
from django.contrib.auth.models import User, Group
from users.models import YearRange
2018-12-29 01:11:57 +00:00
class UserForm(forms.ModelForm):
class Meta:
model = User
2021-04-23 06:48:11 +00:00
fields = ['username', 'email', 'password', 'date_joined']
2018-12-29 06:49:25 +00:00
class GroupForm(forms.ModelForm):
class Meta:
model = Group
fields = '__all__'
class YearRangeForm(forms.ModelForm):
class Meta:
model = YearRange
fields = '__all__'