0001_initial.py 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Generated by Django 4.1.4 on 2022-12-16 19:11
  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. class Migration(migrations.Migration):
  7. initial = True
  8. dependencies = [
  9. ('auth', '0012_alter_user_first_name_max_length'),
  10. ]
  11. operations = [
  12. migrations.CreateModel(
  13. name='AdvUser',
  14. fields=[
  15. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  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. ('is_activated', models.BooleanField(db_index=True, default=True, verbose_name='Прошел активацию?')),
  27. ('send_messages', models.BooleanField(default=True, verbose_name='Слать оповещение о новых коментариях?')),
  28. ('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')),
  29. ('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')),
  30. ],
  31. options={
  32. 'verbose_name': 'user',
  33. 'verbose_name_plural': 'users',
  34. 'abstract': False,
  35. },
  36. managers=[
  37. ('objects', django.contrib.auth.models.UserManager()),
  38. ],
  39. ),
  40. ]