Coverage for users\migrations\0001_initial.py: 100%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

8 statements  

1# Generated by Django 3.2.8 on 2021-11-07 22:40 

2 

3import django.contrib.auth.models 

4import django.contrib.auth.validators 

5from django.db import migrations, models 

6import django.utils.timezone 

7 

8 

9class Migration(migrations.Migration): 

10 

11 initial = True 

12 

13 dependencies = [ 

14 ('auth', '0012_alter_user_first_name_max_length'), 

15 ] 

16 

17 operations = [ 

18 migrations.CreateModel( 

19 name='CustomUser', 

20 fields=[ 

21 ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 

22 ('password', models.CharField(max_length=128, verbose_name='password')), 

23 ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), 

24 ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), 

25 ('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')), 

26 ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')), 

27 ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')), 

28 ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')), 

29 ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')), 

30 ('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')), 

31 ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), 

32 ('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')), 

33 ('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')), 

34 ], 

35 options={ 

36 'verbose_name': 'user', 

37 'verbose_name_plural': 'users', 

38 'abstract': False, 

39 }, 

40 managers=[ 

41 ('objects', django.contrib.auth.models.UserManager()), 

42 ], 

43 ), 

44 ]