Exesize

Форк
0
/
0001_initial.py 
45 строк · 3.0 Кб
1
# Generated by Django 4.0.4 on 2022-05-25 18:14
2

3
import django.contrib.auth.models
4
import django.contrib.auth.validators
5
import django.utils.timezone
6
from django.db import migrations, models
7

8

9
class 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='User',
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
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
29
                ('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')),
30
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
31
                ('email', models.EmailField(blank=True, max_length=254, unique=True, verbose_name='Email')),
32
                ('age', models.PositiveSmallIntegerField(blank=True, null=True, verbose_name='Возраст')),
33
                ('avatar', models.ImageField(blank=True, null=True, upload_to='users')),
34
                ('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')),
35
                ('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')),
36
            ],
37
            options={
38
                'verbose_name': 'пользователь',
39
                'verbose_name_plural': 'пользователи',
40
            },
41
            managers=[
42
                ('objects', django.contrib.auth.models.UserManager()),
43
            ],
44
        ),
45
    ]
46

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.