spradio-server-django/savepointradio/core/forms.py

29 lines
553 B
Python
Raw Normal View History

2020-01-21 17:20:40 +00:00
from django import forms
from django.contrib.auth.forms import UserChangeForm, UserCreationForm
2020-01-21 18:20:07 +00:00
from django.utils.translation import gettext_lazy as _
2020-01-21 17:20:40 +00:00
from .models import RadioUser
class RadioUserChangeForm(UserChangeForm):
'''
A form for updating users for the radio.
'''
class Meta:
model = RadioUser
fields = '__all__'
class RadioUserCreationForm(UserCreationForm):
'''
A form for creating new users for the radio.
'''
class Meta:
model = RadioUser
fields = ('email', 'name')