Use the correct user model when creating users
This commit is contained in:
parent
306ca2bcc8
commit
94b2529ab6
1 changed files with 3 additions and 1 deletions
|
@ -1,8 +1,10 @@
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth import get_user_model
|
||||||
from django.contrib.auth.forms import UserCreationForm
|
from django.contrib.auth.forms import UserCreationForm
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
|
User = get_user_model()
|
||||||
|
|
||||||
|
|
||||||
class CreateUserForm(UserCreationForm):
|
class CreateUserForm(UserCreationForm):
|
||||||
key = forms.CharField(
|
key = forms.CharField(
|
||||||
|
|
Loading…
Reference in a new issue