mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-15 17:34:52 +03:00
Try linting again
This commit is contained in:
parent
eaf073d232
commit
e7351d8c33
|
@ -1,7 +1,7 @@
|
|||
{%- if cookiecutter.username_type == "email" -%}
|
||||
from django.contrib.auth.hashers import make_password
|
||||
from django.contrib.auth.models import AbstractUser, UserManager as DjangoUserManager
|
||||
{%- else %}
|
||||
{%- else -%}
|
||||
from django.contrib.auth.models import AbstractUser
|
||||
{%- 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.")
|
||||
|
||||
return self._create_user(email, password, **extra_fields)
|
||||
|
||||
{%- endif %}
|
||||
|
||||
|
||||
class User(AbstractUser):
|
||||
"""
|
||||
Default custom user model for {{cookiecutter.project_name}}.
|
||||
|
|
Loading…
Reference in New Issue
Block a user