1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Refs #33476 -- Reformatted code with Black.

This commit is contained in:
django-bot
2022-02-03 20:24:19 +01:00
committed by Mariusz Felisiak
parent f68fa8b45d
commit 9c19aff7c7
1992 changed files with 139577 additions and 96284 deletions

View File

@@ -3,7 +3,7 @@ from django.db import models
class Email(models.Model):
email = models.EmailField(verbose_name='email address', max_length=255, unique=True)
email = models.EmailField(verbose_name="email address", max_length=255, unique=True)
class CustomUserWithFKManager(BaseUserManager):
@@ -15,11 +15,13 @@ class CustomUserWithFKManager(BaseUserManager):
class CustomUserWithFK(AbstractBaseUser):
username = models.ForeignKey(Email, models.CASCADE, related_name='primary')
email = models.ForeignKey(Email, models.CASCADE, to_field='email', related_name='secondary')
username = models.ForeignKey(Email, models.CASCADE, related_name="primary")
email = models.ForeignKey(
Email, models.CASCADE, to_field="email", related_name="secondary"
)
group = models.ForeignKey(Group, models.CASCADE)
custom_objects = CustomUserWithFKManager()
USERNAME_FIELD = 'username'
REQUIRED_FIELDS = ['email', 'group']
USERNAME_FIELD = "username"
REQUIRED_FIELDS = ["email", "group"]