0001_initial.py 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Generated by Django 4.0.4 on 2022-06-21 14:32
  2. import django.contrib.auth.models
  3. import django.contrib.auth.validators
  4. from django.db import migrations, models
  5. import django.utils.timezone
  6. import uuid
  7. class Migration(migrations.Migration):
  8. initial = True
  9. dependencies = [
  10. ('auth', '0012_alter_user_first_name_max_length'),
  11. ]
  12. operations = [
  13. migrations.CreateModel(
  14. name='CustomUser',
  15. fields=[
  16. ('password', models.CharField(max_length=128, verbose_name='password')),
  17. ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
  18. ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
  19. ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
  20. ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')),
  21. ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
  22. ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
  23. ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
  24. ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
  25. ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
  26. ('_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
  27. ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')),
  28. ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')),
  29. ],
  30. options={
  31. 'verbose_name': 'user',
  32. 'verbose_name_plural': 'users',
  33. 'abstract': False,
  34. },
  35. managers=[
  36. ('objects', django.contrib.auth.models.UserManager()),
  37. ],
  38. ),
  39. ]