mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-16 01:44:51 +03:00
Try linting again
This commit is contained in:
parent
eaf073d232
commit
e7351d8c33
|
@ -1,7 +1,7 @@
|
||||||
{%- if cookiecutter.username_type == "email" -%}
|
{%- if cookiecutter.username_type == "email" -%}
|
||||||
from django.contrib.auth.hashers import make_password
|
from django.contrib.auth.hashers import make_password
|
||||||
from django.contrib.auth.models import AbstractUser, UserManager as DjangoUserManager
|
from django.contrib.auth.models import AbstractUser, UserManager as DjangoUserManager
|
||||||
{%- else %}
|
{%- else -%}
|
||||||
from django.contrib.auth.models import AbstractUser
|
from django.contrib.auth.models import AbstractUser
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
from django.db.models import CharField{%- if cookiecutter.username_type == "email" %}, EmailField{% endif %}
|
from django.db.models import CharField{%- if cookiecutter.username_type == "email" %}, EmailField{% endif %}
|
||||||
|
@ -37,9 +37,9 @@ class UserManager(DjangoUserManager):
|
||||||
raise ValueError("Superuser must have is_superuser=True.")
|
raise ValueError("Superuser must have is_superuser=True.")
|
||||||
|
|
||||||
return self._create_user(email, password, **extra_fields)
|
return self._create_user(email, password, **extra_fields)
|
||||||
|
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
|
|
||||||
class User(AbstractUser):
|
class User(AbstractUser):
|
||||||
"""
|
"""
|
||||||
Default custom user model for {{cookiecutter.project_name}}.
|
Default custom user model for {{cookiecutter.project_name}}.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user