コード例 #1
0
class Migration(migrations.Migration):

    dependencies = [
        ('videos', '0002_auto_20190611_2119'),
    ]

    operations = [
        migrations.AddField(
            model_name='video',
            name='height_field',
            field=models.IntegerField(blank=True, default=0, null=True),
        ),
        migrations.AddField(
            model_name='video',
            name='image',
            field=models.ImageField(blank=True, height_field='height_field', null=True, upload_to=accounts.models.upload_location, width_field='width_field'),
        ),
        migrations.AddField(
            model_name='video',
            name='order',
            field=models.PositiveSmallIntegerField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='video',
            name='width_field',
            field=models.IntegerField(blank=True, default=0, null=True),
        ),
    ]
コード例 #2
0
class Migration(migrations.Migration):

    dependencies = [
        ('accounts', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='user',
            name='age',
            field=models.IntegerField(default=0),
        ),
        migrations.AddField(
            model_name='user',
            name='country',
            field=models.CharField(default='Republic of Korea', max_length=100),
        ),
        migrations.AddField(
            model_name='user',
            name='gender',
            field=models.CharField(default='shared/unisex', max_length=30),
        ),
        migrations.AddField(
            model_name='user',
            name='profile_image',
            field=models.ImageField(blank=True, upload_to=accounts.models.User.profile_image_path),
        ),
        migrations.AddField(
            model_name='user',
            name='role',
            field=models.IntegerField(default=0),
        ),
    ]
コード例 #3
0
class Migration(migrations.Migration):

    dependencies = [
        ('accounts', '0007_auto_20170628_1547'),
    ]

    operations = [
        migrations.AddField(
            model_name='userprofile',
            name='height_field',
            field=models.IntegerField(default=0),
        ),
        migrations.AddField(
            model_name='userprofile',
            name='image',
            field=models.ImageField(blank=True,
                                    height_field='height_field',
                                    null=True,
                                    upload_to=accounts.models.upload_location,
                                    width_field='width_field'),
        ),
        migrations.AddField(
            model_name='userprofile',
            name='width_field',
            field=models.IntegerField(default=0),
        ),
    ]
コード例 #4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('avatar',
                 models.ImageField(blank=True,
                                   default='default-user-image.png',
                                   height_field='height_field',
                                   null=True,
                                   upload_to=accounts.models.upload_location,
                                   width_field='width_field')),
                ('height_field', models.IntegerField(default=50)),
                ('width_field', models.IntegerField(default=50)),
                ('user',
                 models.OneToOneField(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
コード例 #5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='UserAccount',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('photo',
                 models.ImageField(blank=True,
                                   height_field='height_field',
                                   null=True,
                                   upload_to=accounts.models.upload_location,
                                   width_field='width_field')),
                ('width_field', models.IntegerField(default=0, null=True)),
                ('height_field', models.IntegerField(default=0, null=True)),
                ('bio',
                 models.TextField(blank=True,
                                  max_length=60,
                                  null=True,
                                  verbose_name='You in 60 words.')),
                ('phone',
                 phonenumber_field.modelfields.PhoneNumberField(
                     blank=True, max_length=128,
                     verbose_name='Contact Number')),
                ('status', models.CharField(default='Student',
                                            max_length=128)),
                ('totos',
                 models.IntegerField(default=0, verbose_name='Contribution')),
                ('user_since', models.DateTimeField(auto_now=True)),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=255,
                                   null=True,
                                   unique=True,
                                   verbose_name='email address')),
                ('custom_link', models.URLField(blank=True, null=True)),
                ('facebook_link', models.URLField(blank=True, null=True)),
                ('twitter_link', models.URLField(blank=True, null=True)),
                ('linkedin_link', models.URLField(blank=True, null=True)),
                ('github_link', models.URLField(blank=True, null=True)),
                ('reddit_link', models.URLField(blank=True, null=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
コード例 #6
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=30, unique=True, validators=[django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.')], verbose_name='username')),
                ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=30, verbose_name='last name')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('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')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('gender', models.CharField(choices=[('M', 'Male'), ('F', 'Female')], max_length=1)),
                ('default_currency', models.CharField(choices=[('EGP', 'EGP'), ('USD', 'USD')], max_length=3)),
                ('phone_number', models.CharField(max_length=11)),
                ('account_type', models.CharField(choices=[('BR', 'Buyer/Renter'), ('PO', 'Private Owner'), ('B', 'Broker'), ('RC', 'Real Estate Company')], max_length=2)),
                ('_image', models.ImageField(blank=True, height_field='img_height', null=True, upload_to=accounts.models.upload_location, width_field='img_width')),
                ('img_height', models.IntegerField(default=0)),
                ('img_width', models.IntegerField(default=0)),
                ('points', models.IntegerField(default=100)),
                ('social_media', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='UserMessages',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('msg_body', models.TextField()),
            ],
        ),
    ]
コード例 #7
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Users',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('user_id', models.CharField(max_length=9, unique=True)),
                ('user_name', models.CharField(max_length=100)),
                ('user_age', models.IntegerField()),
                ('user_ranking', models.FloatField()),
                ('user_photo',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=accounts.models.Users.upload_resume)),
            ],
        ),
    ]
コード例 #8
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('username', models.CharField(max_length=100, unique=True)),
                ('email', models.EmailField(max_length=254)),
                ('first_name', models.CharField(blank=True, default='', max_length=50)),
                ('last_name', models.CharField(blank=True, default='', max_length=50)),
                ('photo', models.ImageField(blank=True, null=True, upload_to=accounts.models.user_directory_path)),
                ('bio', models.TextField(blank=True, default='')),
                ('is_active', models.BooleanField(default=True)),
                ('is_admin', models.BooleanField(default=False)),
                ('staff_or_intern', models.IntegerField(choices=[(0, 'Neither'), (1, 'Estudio Caribe Staff'), (2, 'Estudio Caribe Intern')], default=0, verbose_name='Is staff or intern?')),
                ('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')),
                ('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')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
コード例 #9
0
class Migration(migrations.Migration):

    dependencies = [
        ('accounts', '0003_auto_20200324_1221'),
    ]

    operations = [
        migrations.AlterField(
            model_name='user_profile',
            name='address',
            field=models.CharField(blank=True, max_length=400, null=True),
        ),
        migrations.AlterField(
            model_name='user_profile',
            name='phone',
            field=models.IntegerField(blank=True, null=True),
        ),
        migrations.AlterField(
            model_name='user_profile',
            name='user_img',
            field=models.ImageField(blank=True,
                                    null=True,
                                    upload_to=accounts.models.photo_path),
        ),
    ]
コード例 #10
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(max_length=50, unique=True)),
                ('email', models.EmailField(max_length=255, unique=True)),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('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')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='date joined')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated at')),
                ('token_version', models.IntegerField(default=0)),
                ('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')),
                ('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')),
            ],
            options={
                'abstract': False,
            },
            managers=[
                ('objects', accounts.models.UserManager()),
            ],
        ),
    ]
コード例 #11
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='UserProfileInfo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('yearofpassing',
                 models.IntegerField(choices=[(2019, 2019), (2020, 2020),
                                              (2021, 2021), (2022, 2022),
                                              (2023, 2023), (2024, 2024),
                                              (2025, 2025), (2026, 2026),
                                              (2027, 2027), (2028, 2028)],
                                     default=accounts.models.current_year,
                                     verbose_name='year')),
                ('resume', models.ImageField(upload_to='resumes')),
                ('cgpa', models.FloatField()),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
コード例 #12
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('email', models.EmailField(max_length=254, unique=True, verbose_name='メールアドレス')),
                ('first_name', models.CharField(max_length=100, verbose_name='姓')),
                ('last_name', models.CharField(max_length=100, verbose_name='名')),
                ('account_type', models.IntegerField(choices=[(1, 'ユーザー'), (2, 'スタッフ')], default=1, verbose_name='アカウントの種類')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('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')),
                ('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')),
                ('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')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
            },
            managers=[
                ('objects', accounts.models.UserManager()),
            ],
        ),
    ]
コード例 #13
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('lands', '0027_auto_20170604_1317'),
    ]

    operations = [
        migrations.CreateModel(
            name='Camera',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('url', models.CharField(max_length=1024, verbose_name='页面地址(URL)信息:')),
                ('title', models.CharField(blank=True, max_length=64, null=True, verbose_name='标题')),
                ('definition', models.PositiveSmallIntegerField(blank=True, choices=[(1, '512/768kpbs'), (2, '128/256kpbs')], default=1, null=True, verbose_name='分辨率')),
                ('abstract', models.TextField(blank=True, max_length=1024, null=True, verbose_name='简介')),
                ('cover_img', models.ImageField(blank=True, null=True, upload_to=accounts.models.user_directory_path, verbose_name='封面图片')),
                ('password', models.CharField(blank=True, help_text='纯数字,最长 6 位数', max_length=6, null=True, verbose_name='播放密码')),
                ('duration', models.IntegerField(default=10, verbose_name='播放时长限制')),
                ('created_date', models.DateField(auto_now_add=True, verbose_name='创建时间')),
                ('updated_date', models.DateField(auto_now=True, verbose_name='修改时间')),
                ('is_active', models.BooleanField(default=True, verbose_name='是否被激活')),
                ('land', models.ForeignKey(default=1, help_text='摄像头所安置的土地名', on_delete=django.db.models.deletion.CASCADE, to='lands.Land', verbose_name='土地')),
            ],
        ),
    ]
コード例 #14
0
ファイル: 0001_initial.py プロジェクト: shanart/buybikeshop
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('userpic',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=accounts.models.upload_location)),
                ('bio', models.TextField(blank=True, max_length=500)),
                ('location', models.CharField(blank=True, max_length=30)),
                ('age', models.IntegerField(default=18)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
コード例 #15
0
ファイル: 0001_initial.py プロジェクト: jphalis/wipp-django
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0007_alter_validators_add_error_messages'),
    ]

    operations = [
        migrations.CreateModel(
            name='MyUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('email', models.EmailField(max_length=80, unique=True, verbose_name='email')),
                ('full_name', models.CharField(default='Temporary Name', max_length=120)),
                ('profile_picture', models.ImageField(blank=True, upload_to=accounts.models.upload_location)),
                ('phone_number', models.CharField(blank=True, max_length=18)),
                ('is_active', models.BooleanField(default=True, verbose_name='active')),
                ('is_admin', models.BooleanField(default=False, verbose_name='admin')),
                ('is_confirmed', models.BooleanField(default=False, verbose_name='confirmed')),
                ('date_joined', models.DateTimeField(auto_now_add=True, verbose_name='date joined')),
                ('modified', models.DateTimeField(auto_now=True)),
                ('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')),
                ('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')),
            ],
        ),
        migrations.CreateModel(
            name='Driver',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('is_active', models.BooleanField(default=True, verbose_name='active')),
                ('car_make', models.CharField(blank=True, max_length=30)),
                ('car_model', models.CharField(blank=True, max_length=30)),
                ('car_status', models.IntegerField(choices=[(0, 'New'), (1, 'Good'), (2, 'Fair'), (3, 'Poor')], default=0)),
                ('license_plate', models.CharField(blank=True, max_length=12)),
                ('rating', models.IntegerField(default=0)),
                ('trips_completed', models.IntegerField(default=0)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
コード例 #16
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Bus',
            fields=[
                ('busid', models.PositiveIntegerField(primary_key=True, serialize=False)),
                ('busname', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='StartTime',
            fields=[
                ('startid', models.CharField(max_length=20, primary_key=True, serialize=False)),
                ('startdate', models.DateField()),
                ('starttime', models.TimeField()),
                ('busid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Bus')),
            ],
        ),
        migrations.CreateModel(
            name='Seat',
            fields=[
                ('seatid', models.IntegerField(primary_key=True, serialize=False)),
                ('seatrow', models.IntegerField()),
                ('seatcol', models.CharField(max_length=11)),
                ('status', models.BooleanField(default=False)),
                ('startid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.StartTime')),
            ],
        ),
        migrations.CreateModel(
            name='Reservation',
            fields=[
                ('reservationid', models.CharField(max_length=20, primary_key=True, serialize=False)),
                ('busid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Bus')),
                ('seatid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Seat')),
                ('startid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.StartTime')),
                ('username', models.ForeignKey(default=accounts.models.User, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
コード例 #17
0
class Migration(migrations.Migration):

    dependencies = [
        ('accounts', '0008_auto_20180530_1638'),
    ]

    operations = [
        migrations.RenameField(
            model_name='userprofile',
            old_name='height_field',
            new_name='height_coverfield',
        ),
        migrations.RenameField(
            model_name='userprofile',
            old_name='width_field',
            new_name='height_profilefield',
        ),
        migrations.AddField(
            model_name='userprofile',
            name='cover_image',
            field=models.ImageField(blank=True,
                                    height_field='height_coverfield',
                                    null=True,
                                    upload_to=accounts.models.upload_location,
                                    width_field='width_coverfield'),
        ),
        migrations.AddField(
            model_name='userprofile',
            name='width_coverfield',
            field=models.IntegerField(default=0),
        ),
        migrations.AddField(
            model_name='userprofile',
            name='width_profilefield',
            field=models.IntegerField(default=0),
        ),
        migrations.AlterField(
            model_name='userprofile',
            name='profile_image',
            field=models.ImageField(blank=True,
                                    height_field='height_profilefield',
                                    null=True,
                                    upload_to=accounts.models.upload_location,
                                    width_field='width_profilefield'),
        ),
    ]
コード例 #18
0
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('accounts', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserAccount',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('photo',
                 models.ImageField(blank=True,
                                   height_field='height_field',
                                   null=True,
                                   upload_to=accounts.models.upload_location,
                                   width_field='width_field')),
                ('width_field', models.IntegerField(default=0, null=True)),
                ('height_field', models.IntegerField(default=0, null=True)),
                ('bio', models.TextField(blank=True, max_length=500,
                                         null=True)),
                ('phone',
                 phonenumber_field.modelfields.PhoneNumberField(
                     blank=True, max_length=128)),
                ('status', models.CharField(default='Student',
                                            max_length=128)),
                ('totos', models.IntegerField(default=0)),
                ('user_since', models.DateTimeField(auto_now=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.RemoveField(
            model_name='userprofile',
            name='user',
        ),
        migrations.DeleteModel(name='UserProfile', ),
    ]
コード例 #19
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Account',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(blank=True, max_length=120, null=True)),
                ('first_name',
                 models.CharField(blank=True, max_length=120, null=True)),
                ('last_name',
                 models.CharField(blank=True, max_length=120, null=True)),
                ('email',
                 models.CharField(blank=True, max_length=120, null=True)),
                ('location',
                 models.CharField(blank=True, max_length=120, null=True)),
                ('image',
                 models.ImageField(blank=True,
                                   height_field='height_field',
                                   null=True,
                                   upload_to=accounts.models.upload_location,
                                   width_field='width_field')),
                ('height_field', models.IntegerField(default=0)),
                ('width_field', models.IntegerField(default=0)),
                ('user',
                 models.ForeignKey(default=1,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['user'],
            },
        ),
    ]
コード例 #20
0
class Migration(migrations.Migration):

    dependencies = [
        ('accounts', '0010_auto_20200502_1259'),
    ]

    operations = [
        migrations.AlterField(
            model_name='account',
            name='gave',
            field=models.IntegerField(default=0, validators=[accounts.models.Account.validate_amount]),
        ),
        migrations.AlterField(
            model_name='account',
            name='got',
            field=models.IntegerField(default=0, validators=[accounts.models.Account.validate_amount]),
        ),
    ]
コード例 #21
0
class Migration(migrations.Migration):

    dependencies = [
        ('accounts', '0005_merge_20201105_0147'),
    ]

    operations = [
        migrations.AlterField(
            model_name='profile',
            name='address',
            field=models.CharField(blank=True,
                                   help_text='*',
                                   max_length=50,
                                   null=True,
                                   verbose_name='Адрес'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='driver_license',
            field=models.CharField(blank=True,
                                   help_text='*',
                                   max_length=8,
                                   null=True,
                                   unique=True,
                                   verbose_name='№ лиценции'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='experience',
            field=models.IntegerField(
                blank=True,
                help_text='*',
                null=True,
                validators=[accounts.models.validate_date],
                verbose_name='Опыт вождения'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='patronymic',
            field=models.CharField(blank=True,
                                   help_text='*',
                                   max_length=50,
                                   null=True,
                                   verbose_name='Отчество'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='phone',
            field=models.CharField(blank=True,
                                   help_text='*',
                                   max_length=13,
                                   null=True,
                                   unique=True,
                                   verbose_name='Телефон'),
        ),
    ]
コード例 #22
0
ファイル: 0001_initial.py プロジェクト: PHironaka/bi-fun
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('username', models.CharField(max_length=255, unique=True)),
                ('email',
                 models.EmailField(max_length=255,
                                   unique=True,
                                   verbose_name='email address')),
                ('image',
                 models.ImageField(blank=True,
                                   height_field='height_field',
                                   null=True,
                                   upload_to=accounts.models.upload_location,
                                   width_field='width_field')),
                ('active', models.BooleanField(default=True)),
                ('staff', models.BooleanField(default=False)),
                ('admin', models.BooleanField(default=False)),
                ('height_field', models.IntegerField(default=0)),
                ('width_field', models.IntegerField(default=0)),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
コード例 #23
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Office_HistoryTransfer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('HistoryTransfer_userGets', models.IntegerField(verbose_name=accounts.models.User)),
                ('HistoryTransfer_TransferAmount', models.IntegerField(default=0)),
                ('HistoryTransfer_userTransfer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
コード例 #24
0
class Migration(migrations.Migration):

    dependencies = [
        ('accounts', '0003_auto_20201104_1954'),
    ]

    operations = [
        migrations.AlterField(
            model_name='profile',
            name='address',
            field=models.CharField(help_text='*',
                                   max_length=50,
                                   verbose_name='Адрес'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='date_of_birth',
            field=models.DateField(blank=True,
                                   help_text='Формат: <em>ГГГГ-ММ-ДД</em>.',
                                   null=True,
                                   verbose_name='Дата рождения'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='driver_license',
            field=models.CharField(help_text='*',
                                   max_length=8,
                                   unique=True,
                                   verbose_name='№ лиценции'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='experience',
            field=models.IntegerField(
                help_text='*',
                validators=[accounts.models.validate_date],
                verbose_name='Опыт вождения'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='patronymic',
            field=models.CharField(help_text='*',
                                   max_length=50,
                                   verbose_name='Отчество'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='phone',
            field=models.CharField(help_text='*',
                                   max_length=13,
                                   unique=True,
                                   verbose_name='Телефон'),
        ),
    ]
コード例 #25
0
class Migration(migrations.Migration):

    dependencies = [
        ('accounts', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='user',
            name='avatar',
            field=models.ImageField(blank=True,
                                    height_field='height_field',
                                    null=True,
                                    upload_to=accounts.models.upload_location,
                                    width_field='width_field'),
        ),
        migrations.AddField(
            model_name='user',
            name='bio',
            field=models.TextField(blank=True, max_length=500),
        ),
        migrations.AddField(
            model_name='user',
            name='gender',
            field=models.CharField(choices=[('NONE', 'NONE'),
                                            ('FEMALE', 'FEMALE'),
                                            ('MALE', 'MALE')],
                                   default=None,
                                   max_length=10),
        ),
        migrations.AddField(
            model_name='user',
            name='height_field',
            field=models.IntegerField(default=0),
        ),
        migrations.AddField(
            model_name='user',
            name='width_field',
            field=models.IntegerField(default=0),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('display_name', models.CharField(max_length=150, verbose_name='Display name')),
                ('phone_number', models.CharField(max_length=15, unique=True, verbose_name='Phone number')),
                ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('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')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
            ],
            options={
                'abstract': False,
            },
            managers=[
                ('objects', accounts.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='PhoneOTP',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('phone_number', models.CharField(max_length=15, unique=True)),
                ('otp', models.CharField(max_length=6)),
                ('initial', models.IntegerField(blank=True, null=True)),
                ('elapse', models.IntegerField(blank=True, null=True)),
                ('validated', models.BooleanField(default=False)),
            ],
        ),
    ]
コード例 #27
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Perfil',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('perfil',
                 models.CharField(choices=[('CLIENTE', 'Cliente'),
                                           ('ESCOLA', 'Escola'),
                                           ('FORNECEDOR', 'Fornecedor'),
                                           ('FUNCIONARIO', 'Funcionario')],
                                  max_length=2)),
            ],
        ),
        migrations.CreateModel(
            name='Pessoa',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('perfil',
                 models.CharField(max_length=2,
                                  verbose_name=accounts.models.Perfil)),
                ('codigo', models.IntegerField()),
                ('nome', models.CharField(max_length=150)),
                ('aniversario', models.DateField()),
                ('telefone', models.CharField(max_length=10)),
                ('celular', models.CharField(max_length=11)),
                ('endereco', models.CharField(max_length=150)),
                ('numero', models.CharField(max_length=10)),
                ('bairro', models.CharField(max_length=50)),
                ('cidade', models.CharField(max_length=50)),
                ('cep', models.CharField(max_length=11)),
                ('uf', models.CharField(max_length=2)),
                ('cpf', models.CharField(max_length=11)),
                ('cnpj', models.CharField(max_length=50)),
                ('n_ie', models.CharField(max_length=50)),
                ('n_im', models.CharField(max_length=10)),
                ('descricao', models.TextField()),
            ],
        ),
    ]
コード例 #28
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
       
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('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')),
                ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('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')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('phone_number', models.IntegerField(blank=True, null=True)),
                ('is_subscribed', models.BooleanField(default=False)),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', accounts.models.AccountUserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Subscription',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=10)),
                ('cost', models.DecimalField(decimal_places=2, max_digits=4)),
            ],
        ),
        migrations.CreateModel(
            name='UserSubscriptions',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Subscription', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='accounts.Subscription')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
コード例 #29
0
ファイル: 0001_initial.py プロジェクト: karam81/AIGARET
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('username', models.CharField(max_length=20, unique=True)),
                ('name', models.CharField(max_length=20)),
                ('age', models.IntegerField(null=True)),
                ('goal_time', models.IntegerField(blank=True, null=True)),
                ('profile_image', models.TextField(blank=True, null=True)),
                ('is_staff', models.BooleanField(default=False)),
                ('is_admin', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('is_superuser', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
            managers=[
                ('objects', accounts.models.UserManager()),
            ],
        ),
    ]
コード例 #30
0
class Migration(migrations.Migration):

    dependencies = [
        ('accounts', '0010_auto_20170317_1250'),
    ]

    operations = [
        migrations.AlterField(
            model_name='userinput',
            name='user_answer',
            field=models.IntegerField(verbose_name=accounts.models.Answer),
        ),
    ]