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='土地')),
            ],
        ),
    ]
Example #2
0
class Migration(migrations.Migration):

    initial = True

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

    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')),
                ('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)),
                ('name', models.CharField(max_length=100)),
                ('date_of_birth', models.DateField(blank=True, null=True)),
                ('is_staff', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now)),
                ('last_login', models.DateField(null=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')),
            ],
            options={
                'abstract': False,
            },
            managers=[
                ('objects', accounts.models.CustomUserManager()),
            ],
        ),
    ]
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=60, unique=True)),
                ('deadline', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='Sequence',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=60, unique=True)),
                ('status', models.CharField(max_length=60)),
                ('description', models.CharField(max_length=255)),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sequences', to='accounts.project')),
            ],
        ),
        migrations.CreateModel(
            name='Shot',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('shotcode', models.CharField(max_length=60, unique=True)),
                ('status', models.CharField(max_length=60)),
                ('cut_in', models.DecimalField(decimal_places=2, max_digits=9)),
                ('cut_out', models.DecimalField(decimal_places=2, max_digits=9)),
                ('cut_duration', models.DecimalField(decimal_places=2, max_digits=9)),
                ('sequence', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='shots', to='accounts.sequence')),
            ],
        ),
        migrations.AlterField(
            model_name='user',
            name='usertype',
            field=models.ForeignKey(default=accounts.models.get_default_artist_usertype, on_delete=django.db.models.deletion.CASCADE, related_name='users', to='accounts.usertype'),
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('task_name', models.CharField(max_length=60, unique=True)),
                ('pipeline_step', models.CharField(max_length=60)),
                ('status', models.CharField(max_length=60)),
                ('startdate', models.DateField()),
                ('duedate', models.DateField()),
                ('assigned_to', models.ManyToManyField(related_name='assignedtasks', to=settings.AUTH_USER_MODEL)),
                ('link', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tasks', to='accounts.shot')),
                ('reviewer', models.ManyToManyField(related_name='taskstoreview', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #4
0
class Migration(migrations.Migration):

    dependencies = [
        ('company', '0017_remitamandatestatusreport'),
        ('accounts', '0007_thirdpartycreds_remita_dd_api_token'),
    ]

    operations = [
        migrations.CreateModel(
            name='BankAccountType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=128, null=True)),
                ('maximum_withdrawal_amount', models.DecimalField(blank=True, decimal_places=2, max_digits=12, null=True)),
                ('annual_interest_rate', models.DecimalField(decimal_places=2, help_text='Interest rate from 0 - 100', max_digits=5, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100)])),
                ('interest_calculation_per_year', models.PositiveSmallIntegerField(help_text='The number of times interest will be calculated per year', validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(12)])),
            ],
        ),
        migrations.AlterModelManagers(
            name='user',
            managers=[
                ('objects', accounts.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='UserBankAccount',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('account_no', models.PositiveIntegerField(unique=True)),
                ('gender', models.CharField(choices=[('M', 'Male'), ('F', 'Female')], max_length=1)),
                ('birth_date', models.DateField(blank=True, null=True)),
                ('balance', models.DecimalField(decimal_places=2, default=0, max_digits=12)),
                ('interest_start_date', models.DateField(blank=True, help_text='The month number that interest calculation will start from', null=True)),
                ('initial_deposit_date', models.DateField(blank=True, null=True)),
                ('account_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='accounts', to='accounts.BankAccountType')),
                ('company', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='company.Company')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='account', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserAddress',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('street_address', models.CharField(max_length=512)),
                ('city', models.CharField(max_length=256)),
                ('postal_code', models.PositiveIntegerField()),
                ('country', models.CharField(max_length=256)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='address', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Farm',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=24, unique=True)),
                ('addr', models.CharField(blank=True, max_length=64)),
                ('phone', models.CharField(blank=True, max_length=16)),
                ('subject', models.CharField(blank=True, max_length=128)),
                ('price', models.PositiveIntegerField(default=0)),
                ('desc', models.TextField(blank=True, null=True)),
                ('notice',
                 models.TextField(blank=True, max_length=1024, null=True)),
                ('is_delete', models.BooleanField(default=False)),
                ('created_date', models.DateField(auto_now_add=True)),
                ('updated_date', models.DateField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='FarmImage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=accounts.models.user_directory_path)),
                ('is_delete', models.BooleanField(default=False)),
                ('created_date', models.DateField(auto_now_add=True)),
                ('updated_date', models.DateField(auto_now=True)),
                ('flags', models.IntegerField(db_index=True, default=0)),
                ('farm',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='images',
                                   to='farm.Farm')),
            ],
        ),
    ]
class Migration(migrations.Migration):

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

    operations = [
        migrations.AlterField(
            model_name='userprofile',
            name='birth_date',
            field=models.DateField(default=None, null=True),
        ),
        migrations.AlterField(
            model_name='userprofile',
            name='country',
            field=django_countries.fields.CountryField(blank=True, max_length=2, null=True),
        ),
        migrations.AlterField(
            model_name='userprofile',
            name='expires',
            field=models.DateTimeField(default=accounts.models.one_day_hence),
        ),
        migrations.AlterField(
            model_name='userprofile',
            name='profile_pic',
            field=models.ImageField(blank=True, default=None, null=True, upload_to=''),
        ),
        migrations.AlterField(
            model_name='userprofile',
            name='time_stamp',
            field=models.DateTimeField(default=django.utils.timezone.now),
        ),
    ]
Example #7
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('picture',
                 models.ImageField(default='blank/no_img.png',
                                   upload_to=accounts.models.user_id)),
                ('date_of_birth', models.DateField(blank=True, null=True)),
                ('bio', models.TextField(blank=True, max_length=500,
                                         null=True)),
                ('website',
                 models.CharField(blank=True, max_length=255, null=True)),
                ('location',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #8
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='ResetToken',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('token', models.CharField(max_length=50)),
                ('expiration_date',
                 models.DateField(
                     default=accounts.models.get_expiration_date)),
                ('email', models.EmailField(max_length=254)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='token',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #9
0
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')),
                ('birthdate', models.DateField(blank=True, null=True)),
                ('phone', models.CharField(blank=True,
                                           max_length=20,
                                           null=True)),
                ('address', models.TextField(blank=True, null=True)),
                ('balance', models.PositiveIntegerField(default=0)),
                ('profile_image',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=accounts.models.path_and_rename)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
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')),
                ('bio', models.TextField(blank=True, max_length=500)),
                ('avatar',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=accounts.models.user_directory_path,
                     verbose_name='Avatar')),
                ('location', models.CharField(blank=True, max_length=30)),
                ('birth_date', models.DateField(blank=True, null=True)),
                ('email_confirmed', models.BooleanField(default=False)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #11
0
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')),
                ('date_of_birth', models.DateField(blank=True, null=True)),
                ('photo',
                 models.ImageField(
                     blank=True,
                     upload_to=accounts.models.user_directory_path)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #12
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Account',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('email', models.EmailField(max_length=60, unique=True, verbose_name='Email')),
                ('username', models.CharField(max_length=60, unique=True, verbose_name='Username')),
                ('dob', models.DateField(blank=True, null=True, verbose_name='Date of Birth')),
                ('phone', models.CharField(max_length=10, verbose_name='Contact Number')),
                ('about', models.TextField(max_length=500, verbose_name='About')),
                ('experience', models.CharField(choices=[('Beginner', 'Beginner'), ('Amateur', 'Amateur'), ('Semi-Pro', 'Semi-Pro'), ('Professional', 'Professional')], max_length=12, verbose_name='Experience')),
                ('date_joined', models.DateTimeField(auto_now_add=True, verbose_name='Date Joined')),
                ('last_login', models.DateTimeField(auto_now=True, verbose_name='Last Login')),
                ('is_admin', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('is_staff', models.BooleanField(default=False)),
                ('is_superuser', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
            managers=[
                ('objects', accounts.models.UserManager()),
            ],
        ),
    ]
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')),
                ('DOB', models.DateField(blank=True, null=True)),
                ('bio',
                 models.TextField(
                     validators=[accounts.models.min_length_validator])),
                ('avatar', models.ImageField(upload_to='avatars/')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #14
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')),
                ('given_name', models.CharField(max_length=255)),
                ('family_name', models.CharField(max_length=255)),
                ('date_of_birth', models.DateField()),
                ('bio', models.TextField()),
                ('avatar', models.ImageField(blank=True, null=True, upload_to=accounts.models.user_avatar_path)),
                ('city', models.CharField(blank=True, default='', max_length=255)),
                ('state', models.CharField(blank=True, default='', max_length=255)),
                ('country', models.CharField(blank=True, default='', max_length=255)),
                ('favourite_animal', models.CharField(blank=True, default='', max_length=255)),
                ('hobby', models.CharField(blank=True, default='', max_length=255)),
                ('favourite_fountain_pen', models.CharField(blank=True, default='', max_length=255)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
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')),
                ('first_name', models.CharField(blank=True, max_length=50, null=True)),
                ('last_name', models.CharField(blank=True, max_length=50, null=True)),
                ('location', models.CharField(blank=True, max_length=50, null=True)),
                ('url', models.CharField(blank=True, max_length=80, null=True)),
                ('profile_info', models.TextField(blank=True, max_length=150, null=True)),
                ('created', models.DateField(auto_now_add=True)),
                ('picture', models.ImageField(blank=True, null=True, upload_to=accounts.models.user_directory_path, verbose_name='Picture')),
                ('is_eduprovider', models.BooleanField(default=False)),
                ('is_teacher', models.BooleanField(default=False)),
                ('is_parent', models.BooleanField(default=False)),
                ('is_student', models.BooleanField(default=False)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #16
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_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')),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('slug', models.SlugField(blank=True)),
                ('name', models.CharField(blank=True, max_length=100)),
                ('is_active', models.BooleanField(default=True)),
                ('is_admin', models.BooleanField(default=False)),
                ('date_joined', models.DateField(auto_now_add=True)),
                ('avatar', models.ImageField(blank=True, default='avatars/default-avatar-image.png', upload_to=accounts.models.user_directory_path, verbose_name='Profile Picture')),
                ('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',
            },
        ),
    ]
Example #17
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Subject',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('subject_name', models.CharField(max_length=24)),
                ('subject_code',
                 models.CharField(
                     max_length=10,
                     validators=[
                         django.core.validators.RegexValidator(
                             '^[0-9a-zA-Z-]*$',
                             'Only alphanumeric characters are allowed.')
                     ])),
                ('description',
                 models.CharField(
                     max_length=100,
                     validators=[
                         django.core.validators.RegexValidator(
                             '^[0-9a-zA-Z-]*$',
                             'Only alphanumeric characters are allowed.')
                     ])),
            ],
            options={
                'verbose_name': 'Subject',
                'verbose_name_plural': 'Subjects',
            },
        ),
        migrations.CreateModel(
            name='Notes',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=40)),
                ('date', models.DateField()),
                ('file_upload',
                 models.FileField(upload_to=accounts.models.unique_file_path)),
                ('subject',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='accounts.subject')),
            ],
            options={
                'verbose_name': 'Note',
                'verbose_name_plural': 'Notes',
            },
        ),
    ]
Example #18
0
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')),
                ('profile_picture',
                 models.ImageField(default='img/profile_pictures/default.png',
                                   upload_to=accounts.models.upload_location)),
                ('joined_at', models.DateField(auto_now_add=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #19
0
class Migration(migrations.Migration):

    dependencies = [
        ('accounts', '0017_auto_20180820_1312'),
    ]

    operations = [
        migrations.AlterField(
            model_name='profile',
            name='bio',
            field=models.TextField(blank=True, null=True, validators=[accounts.models.min_length]),
        ),
        migrations.AlterField(
            model_name='profile',
            name='birthdate',
            field=models.DateField(blank=True, null=True),
        ),
        migrations.AlterField(
            model_name='user',
            name='email',
            field=models.EmailField(blank=True, max_length=254),
        ),
        migrations.AlterField(
            model_name='user',
            name='first_name',
            field=models.CharField(blank=True, max_length=25),
        ),
        migrations.AlterField(
            model_name='user',
            name='last_name',
            field=models.CharField(blank=True, max_length=25),
        ),
    ]
Example #20
0
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')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('first', models.CharField(blank=True, max_length=30)),
                ('last_name', models.CharField(blank=True, max_length=50)),
                ('birth', models.DateField(blank=True)),
                ('bio', models.TextField(default='', max_length=300)),
                ('location', models.CharField(blank=True, max_length=30)),
                ('ava',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=accounts.models.get_ava_image)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #21
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='AdminUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(max_length=50, unique=True)),
                ('password', models.CharField(max_length=50)),
                ('status', models.BooleanField(default=True)),
            ],
            options={
                'db_table': 'admin',
            },
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('emp_id', models.AutoField(default=accounts.models.auto_emp_id_increment, primary_key=True, serialize=False)),
                ('firstname', models.CharField(max_length=50)),
                ('lastname', models.CharField(max_length=50)),
                ('email', models.EmailField(max_length=100)),
                ('contact', models.IntegerField()),
                ('gender', models.CharField(choices=[('male', 'Male'), ('female', 'Female'), ('transgender', 'Transgender')], max_length=50)),
                ('dob', models.DateField()),
                ('address', models.CharField(max_length=255)),
                ('department', models.CharField(max_length=100)),
                ('designation', models.CharField(max_length=100)),
                ('dateOfHired', models.DateField()),
                ('dateOfJoined', models.DateField()),
                ('profilePic', models.ImageField(blank=True, default='employee/profile-picture.png', null=True, upload_to=accounts.models.documents_path)),
                ('active', models.BooleanField(default=True)),
            ],
            options={
                'db_table': 'employee',
            },
        ),
    ]
Example #22
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')),
                ('email',
                 models.EmailField(max_length=60,
                                   unique=True,
                                   verbose_name='email')),
                ('user_name',
                 models.CharField(max_length=30,
                                  unique=True,
                                  verbose_name='user_name')),
                ('first_name',
                 models.CharField(max_length=30, verbose_name='first name')),
                ('last_name',
                 models.CharField(max_length=30, verbose_name='last name')),
                ('date_joined',
                 models.DateField(auto_now_add=True,
                                  verbose_name='date joined')),
                ('last_login',
                 models.DateTimeField(auto_now=True,
                                      null=True,
                                      verbose_name='last login')),
                ('about', models.TextField(max_length=500)),
                ('profile_image',
                 models.ImageField(blank=True,
                                   default='default_profile.png',
                                   upload_to='')),
                ('is_admin', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('is_staff', models.BooleanField(default=False)),
                ('is_superuser', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
            managers=[
                ('objects', accounts.models.MyUserManager()),
            ],
        ),
    ]
Example #23
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='Телефон'),
        ),
    ]
Example #24
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()),
            ],
        ),
    ]
Example #25
0
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')),
                ('dateOfBirth', models.DateField(blank=True, null=True)),
                ('gender',
                 models.CharField(choices=[('M', 'Male'), ('F', 'Female')],
                                  default='M',
                                  max_length=1)),
                ('phone', models.CharField(max_length=20)),
                ('city', models.CharField(max_length=50)),
                ('country', models.CharField(max_length=50)),
                ('height',
                 models.SmallIntegerField(
                     default=40,
                     validators=[
                         django.core.validators.MaxValueValidator(300),
                         django.core.validators.MinValueValidator(10)
                     ])),
                ('weight',
                 models.SmallIntegerField(
                     default=40,
                     validators=[
                         django.core.validators.MaxValueValidator(300),
                         django.core.validators.MinValueValidator(10)
                     ])),
                ('smoking', models.BooleanField(default=False)),
                ('profile_picture',
                 models.FileField(blank=True,
                                  max_length=255,
                                  null=True,
                                  upload_to=accounts.models.upload_path)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #26
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')),
                ('phone_num',
                 models.CharField(blank=True,
                                  max_length=15,
                                  verbose_name='Telefon')),
                ('gender',
                 models.CharField(blank=True,
                                  choices=[('K', 'Kişi'), ('Q', 'Qadın'),
                                           ('gender', 'gender')],
                                  default='gender',
                                  max_length=12,
                                  verbose_name='Cinsi')),
                ('bio',
                 models.CharField(blank=True,
                                  max_length=100,
                                  verbose_name='Haqqında')),
                ('birth_date',
                 models.DateField(blank=True,
                                  null=True,
                                  verbose_name='Doğum tarixi')),
                ('profile_photo',
                 models.ImageField(blank=True,
                                   default='default/unnamed.jpg',
                                   null=True,
                                   upload_to=accounts.models.upload_to,
                                   verbose_name='Profil şəkli')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Users Profiles',
            },
        ),
    ]
class Migration(migrations.Migration):

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

    operations = [
        migrations.AddField(
            model_name='userprofile',
            name='season_start',
            field=models.DateField(default=accounts.models._default_season_start),
        ),
    ]
Example #28
0
class Promocode(models.Model):
    code = models.CharField(max_length=10, unique=True)
    sale = models.FloatField(default=0.1)
    end_date = models.DateField()
    status = models.CharField(choices=(
        ('active', 'active'),
        ('dead', 'dead'),
    ),
                              max_length=10,
                              default='active')

    def __str__(self):
        return self.code + ' ' + self.status
Example #29
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.UUIDField(auto_created=True, default=accounts.models.create_uuid, editable=False, primary_key=True, serialize=False)),
                ('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=30, verbose_name='last 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')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('nickname', models.CharField(blank=True, max_length=32, null=True, verbose_name='昵称')),
                ('gender', models.IntegerField(choices=[(1, '男'), (0, '女'), (-1, '未知')], default=-1, verbose_name='性别')),
                ('address', models.CharField(blank=True, max_length=100, null=True, verbose_name='居住地')),
                ('birth_date', models.DateField(blank=True, null=True, verbose_name='生日')),
                ('email', models.EmailField(blank=True, max_length=254, null=True, unique=True, verbose_name='邮箱')),
                ('phone', models.CharField(blank=True, max_length=11, null=True, unique=True, verbose_name='手机')),
                ('desc', models.CharField(blank=True, max_length=250, null=True, verbose_name='个人描述')),
                ('avatar', models.ImageField(blank=True, default='/avatars/default.png', upload_to=accounts.models.user_directory_path, verbose_name='头像')),
                ('headline', models.CharField(blank=True, max_length=30, null=True, verbose_name='简介')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('mod_date', models.DateTimeField(auto_now=True, verbose_name='上次更新时间')),
                ('answer_count', models.PositiveIntegerField(default=0, verbose_name='回答数')),
                ('articles_count', models.PositiveIntegerField(default=0, verbose_name='文章数')),
                ('follower_count', models.PositiveIntegerField(default=0, verbose_name='关注者数')),
                ('following_count', models.PositiveIntegerField(default=0, verbose_name='关注人数')),
                ('urltoken', models.SlugField(blank=True, max_length=60, verbose_name='urltoken')),
                ('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': '用户账户',
                'verbose_name_plural': '用户账户',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
Example #30
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='CityOption',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('city_name', models.CharField(blank=True, max_length=100, verbose_name='Nombre de la ciudad')),
                ('postal_code', models.CharField(blank=True, max_length=20, verbose_name='Código postal')),
                ('state', models.CharField(blank=True, max_length=100, verbose_name='Estado, provincia o departamento')),
                ('country', models.CharField(blank=True, max_length=100, verbose_name='País')),
                ('address_region', models.CharField(blank=True, max_length=20, verbose_name='Región usando el formato ISO 3166-1 Ej. SV, AR, MX.')),
            ],
            options={
                'verbose_name': 'Ciudad',
                'verbose_name_plural': 'Ciudades',
                'ordering': ['city_name'],
            },
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('degree', models.CharField(blank=True, help_text='Escribe tu último título académico ej. "Doctorado en medicina".', max_length=100, verbose_name='Profesión o título académico')),
                ('abbreviation', models.CharField(blank=True, max_length=20, verbose_name='Abreviatura de tu nivel académico')),
                ('academic_abbreviation_visible', models.BooleanField(default=False, help_text='La abreviatura de tu nivel académico será visible junto con tu nombre.', verbose_name='Abreviatura de tu nivel académico visible')),
                ('speciality', models.CharField(blank=True, help_text='Escribe la especialidad que desempeñas, si la posees.', max_length=100, verbose_name='Especialidad en tu profesión')),
                ('gender', models.CharField(blank=True, choices=[('hombre', 'hombre'), ('mujer', 'mujer'), ('otro', 'otro')], max_length=6, verbose_name='Sexo')),
                ('country', models.CharField(blank=True, max_length=100, verbose_name='País')),
                ('city', models.CharField(blank=True, max_length=100, verbose_name='Ciudad')),
                ('description', models.TextField(blank=True, help_text='Pequeña introducción de ti, máximo 2000 caracteres.', max_length=2000, null=True, verbose_name='Descripción')),
                ('website', models.URLField(blank=True, verbose_name='Sitio web')),
                ('birthday', models.DateField(blank=True, null=True)),
                ('phone', phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, region=None, verbose_name='+503 2502 6108')),
                ('whatsapp', phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, region=None, verbose_name='WhatsApp ej. +503 7390 5006')),
                ('image', models.ImageField(blank=True, upload_to=accounts.models.profile_picture_directory_path)),
                ('last_updated', models.DateTimeField(auto_now_add=True)),
                ('views', models.PositiveIntegerField(blank=True, default=0)),
                ('is_instructor', models.BooleanField(default=False)),
                ('slug', models.SlugField(blank=True, help_text='URL personalizada para el perfil.', max_length=255, null=True, verbose_name='URL del perfil')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]