mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-14 00:44:53 +03:00
Fix NameError for UserType
This commit is contained in:
parent
fe2800ecd3
commit
496e4573b2
|
@ -1,12 +1,7 @@
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
import typing
|
|
||||||
|
|
||||||
from django.contrib.auth import get_user_model
|
from django.contrib.auth import get_user_model
|
||||||
from rest_framework import serializers
|
from rest_framework import serializers
|
||||||
|
|
||||||
if typing.TYPE_CHECKING:
|
from {{ cookiecutter.project_slug }}.users.models import User as UserType
|
||||||
from {{ cookiecutter.project_slug }}.users.models import User as UserType
|
|
||||||
|
|
||||||
|
|
||||||
User = get_user_model()
|
User = get_user_model()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user