moneropro/users/forms.py

20 lines
620 B
Python
Raw Normal View History

2022-06-30 13:43:56 +00:00
from django import forms
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
2022-07-19 17:01:52 +00:00
from users.models import *
2022-06-30 13:43:56 +00:00
class SignUpForm(UserCreationForm):
email = forms.EmailField(max_length=150, help_text='E-mail')
type = forms.CharField(max_length=100, help_text='Contributor or user?')
class Meta:
model = User
2022-07-19 17:01:52 +00:00
fields = ('username', 'email', 'password1', 'password2', 'type')
class SubscriberForm(forms.ModelForm):
email = forms.EmailField(max_length=150, help_text='E-mail')
class Meta:
model = Subscriber
fields = ('email',)