Mikkel Munch Mortensen
7f01d9a277
And move the to "parked_apps" directory, until we've decided what we want to do with them.
20 lines
462 B
Python
20 lines
462 B
Python
from django import forms
|
|
from django.contrib.auth.forms import UserCreationForm
|
|
from django.contrib.auth.tokens import default_token_generator
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
from . import models
|
|
|
|
|
|
def get_confirm_code(email):
|
|
return default_token_generator(email)[:7]
|
|
|
|
|
|
class SignupForm(UserCreationForm):
|
|
|
|
username = forms.EmailField(label=_("Email"))
|
|
|
|
class Meta:
|
|
model = models.User
|
|
fields = ("username",)
|