User settings.AUTH_USER_MODEL instead of User in models
This commit is contained in:
parent
7bb6b2f671
commit
e26f552aff
1 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,7 @@ import pathlib
|
||||||
import uuid
|
import uuid
|
||||||
from datetime import date
|
from datetime import date
|
||||||
|
|
||||||
from django.contrib.auth.models import User
|
from django.conf import settings
|
||||||
from django.core.validators import FileExtensionValidator
|
from django.core.validators import FileExtensionValidator
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.forms import ModelForm
|
from django.forms import ModelForm
|
||||||
|
@ -12,7 +12,7 @@ from django.utils.translation import gettext as _
|
||||||
|
|
||||||
class UserModel(models.Model):
|
class UserModel(models.Model):
|
||||||
user = models.ForeignKey(
|
user = models.ForeignKey(
|
||||||
User, on_delete=models.CASCADE, verbose_name=_("User"), editable=False
|
settings.AUTH_USER_MODEL, on_delete=models.CASCADE, verbose_name=_("User"), editable=False
|
||||||
)
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|
Loading…
Reference in a new issue