Ejemplo n.º 1
0
class Migration(migrations.Migration):

    dependencies = [
        ('dashboard', '0055_rename_palaceentry_palacecarving'),
    ]

    operations = [
        migrations.AlterField(
            model_name='palacecarving',
            name='image',
            field=models.ImageField(
                blank=True,
                help_text=
                'Optional small photo that will appear next to your carving, no more than 1 megabyte',
                null=True,
                upload_to=dashboard.models.palace_image_file_name,
                validators=[dashboard.models.validate_at_most_1mb]),
        ),
        migrations.AlterField(
            model_name='palacecarving',
            name='visible',
            field=models.BooleanField(
                default=True,
                help_text=
                'Uncheck to hide your carving altogether (can change your mind later)'
            ),
        ),
    ]
Ejemplo n.º 2
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='DecisionTree',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('name', models.CharField(max_length=200)),
                ('slug', models.SlugField(default='')),
                ('owner', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Node',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('name', models.CharField(max_length=240)),
                ('slug', models.SlugField(default='')),
                ('question', dashboard.models.RichTextBleachField()),
                ('input_type', models.CharField(max_length=240)),
                ('data_answer', models.TextField(blank=True, null=True)),
                ('data_logic', models.TextField(blank=True, null=True)),
                ('new_node', models.BooleanField()),
                ('start_node', models.BooleanField()),
                ('end_node', models.BooleanField()),
                ('decision_tree', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dashboard.DecisionTree')),
            ],
        ),
        migrations.AddConstraint(
            model_name='node',
            constraint=models.UniqueConstraint(fields=('slug', 'decision_tree'), name='unique nodeslug per tree'),
        ),
        migrations.AddConstraint(
            model_name='decisiontree',
            constraint=models.UniqueConstraint(fields=('owner', 'slug'), name='unique tree slug per user'),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='AnnouncementPost',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=220)),
                ('body', models.TextField(max_length=60000)),
                ('featured_image',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=dashboard.models.upload_location)),
                ('extra_image_one',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=dashboard.models.upload_location)),
                ('extra_image_two',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=dashboard.models.upload_location)),
                ('extra_image_three',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=dashboard.models.upload_location)),
                ('date_published',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='date published')),
                ('date_updated',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='date updated')),
                ('is_approved', models.BooleanField(default=True)),
                ('slug', models.SlugField(blank=True, unique=True)),
                ('author',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
                ('viewed_by',
                 models.ManyToManyField(
                     related_name='announcement_post_viewed_by',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Ejemplo n.º 4
0
class Migration(migrations.Migration):

    dependencies = [
        ('dashboard', '0049_auto_20210916_2058'),
    ]

    operations = [
        migrations.AddField(
            model_name='palaceentry',
            name='image',
            field=models.ImageField(
                blank=True,
                help_text='Optional small photo of yourself you want to use',
                null=True,
                upload_to=dashboard.models.achievement_image_file_name,
                validators=[dashboard.models.validate_at_most_1mb]),
        ),
        migrations.AlterField(
            model_name='achievement',
            name='image',
            field=models.ImageField(
                blank=True,
                help_text='Image for the obtained badge',
                null=True,
                upload_to=dashboard.models.achievement_image_file_name,
                validators=[dashboard.models.validate_at_most_1mb]),
        ),
        migrations.AlterField(
            model_name='palaceentry',
            name='visible',
            field=models.BooleanField(
                default=True,
                help_text=
                'Uncheck to hide your entry altogether (can change your mind later)'
            ),
        ),
    ]
Ejemplo n.º 5
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')),
                ('title', models.CharField(choices=[('mr.', 'Mr.'), ('miss', 'Miss'), ('mrs.', 'Mrs.'), ('ms.', 'Ms.'), ('dr.', 'Dr.'), ('prof', 'Professor'), ('other', 'Other')], max_length=10)),
                ('first_name', models.CharField(max_length=30)),
                ('last_name', models.CharField(max_length=30)),
                ('mid_name', models.CharField(max_length=30)),
                ('institution', models.CharField(max_length=30)),
                ('unit', models.CharField(blank=True, max_length=30)),
                ('department', models.CharField(max_length=30)),
                ('degree', models.CharField(choices=[('prof.', 'Prof.'), ('dr.', 'Dr.'), ('post-doc', 'Post-Doc'), ('graduate', 'Graduate'), ('undergraduate', 'Undergraduate'), ('other', 'Other')], max_length=10)),
                ('country', models.CharField(choices=[('AF', 'Afghanistan'), ('AX', 'Aland Islands'), ('AL', 'Albania'), ('DZ', 'Algeria'), ('AS', 'American Samoa'), ('AD', 'Andorra'), ('AO', 'Angola'), ('AI', 'Anguilla'), ('AQ', 'Antarctica'), ('AG', 'Antigua and Barbuda'), ('AR', 'Argentina'), ('AM', 'Armenia'), ('AW', 'Aruba'), ('AU', 'Australia'), ('AT', 'Austria'), ('AZ', 'Azerbaijan'), ('BS', 'Bahamas'), ('BH', 'Bahrain'), ('BD', 'Bangladesh'), ('BB', 'Barbados'), ('BY', 'Belarus'), ('BE', 'Belgium'), ('BZ', 'Belize'), ('BJ', 'Benin'), ('BM', 'Bermuda'), ('BT', 'Bhutan'), ('BO', 'Bolivia'), ('BQ', 'Bonaire, Saint Eustatius and Saba '), ('BA', 'Bosnia and Herzegovina'), ('BW', 'Botswana'), ('BV', 'Bouvet Island'), ('BR', 'Brazil'), ('IO', 'British Indian Ocean Territory'), ('VG', 'British Virgin Islands'), ('BN', 'Brunei'), ('BG', 'Bulgaria'), ('BF', 'Burkina Faso'), ('BI', 'Burundi'), ('KH', 'Cambodia'), ('CM', 'Cameroon'), ('CA', 'Canada'), ('CV', 'Cape Verde'), ('KY', 'Cayman Islands'), ('CF', 'Central African Republic'), ('TD', 'Chad'), ('CL', 'Chile'), ('CN', 'China'), ('CX', 'Christmas Island'), ('CC', 'Cocos Islands'), ('CO', 'Colombia'), ('KM', 'Comoros'), ('CK', 'Cook Islands'), ('CR', 'Costa Rica'), ('HR', 'Croatia'), ('CU', 'Cuba'), ('CW', 'Curacao'), ('CY', 'Cyprus'), ('CZ', 'Czech Republic'), ('CD', 'Democratic Republic of the Congo'), ('DK', 'Denmark'), ('DJ', 'Djibouti'), ('DM', 'Dominica'), ('DO', 'Dominican Republic'), ('TL', 'East Timor'), ('EC', 'Ecuador'), ('EG', 'Egypt'), ('SV', 'El Salvador'), ('GQ', 'Equatorial Guinea'), ('ER', 'Eritrea'), ('EE', 'Estonia'), ('ET', 'Ethiopia'), ('FK', 'Falkland Islands'), ('FO', 'Faroe Islands'), ('FJ', 'Fiji'), ('FI', 'Finland'), ('FR', 'France'), ('GF', 'French Guiana'), ('PF', 'French Polynesia'), ('TF', 'French Southern Territories'), ('GA', 'Gabon'), ('GM', 'Gambia'), ('GE', 'Georgia'), ('DE', 'Germany'), ('GH', 'Ghana'), ('GI', 'Gibraltar'), ('GR', 'Greece'), ('GL', 'Greenland'), ('GD', 'Grenada'), ('GP', 'Guadeloupe'), ('GU', 'Guam'), ('GT', 'Guatemala'), ('GG', 'Guernsey'), ('GN', 'Guinea'), ('GW', 'Guinea-Bissau'), ('GY', 'Guyana'), ('HT', 'Haiti'), ('HM', 'Heard Island and McDonald Islands'), ('HN', 'Honduras'), ('HK', 'Hong Kong'), ('HU', 'Hungary'), ('IS', 'Iceland'), ('IN', 'India'), ('ID', 'Indonesia'), ('IR', 'Iran'), ('IQ', 'Iraq'), ('IE', 'Ireland'), ('IM', 'Isle of Man'), ('IL', 'Israel'), ('IT', 'Italy'), ('CI', 'Ivory Coast'), ('JM', 'Jamaica'), ('JP', 'Japan'), ('JE', 'Jersey'), ('JO', 'Jordan'), ('KZ', 'Kazakhstan'), ('KE', 'Kenya'), ('KI', 'Kiribati'), ('XK', 'Kosovo'), ('KW', 'Kuwait'), ('KG', 'Kyrgyzstan'), ('LA', 'Laos'), ('LV', 'Latvia'), ('LB', 'Lebanon'), ('LS', 'Lesotho'), ('LR', 'Liberia'), ('LY', 'Libya'), ('LI', 'Liechtenstein'), ('LT', 'Lithuania'), ('LU', 'Luxembourg'), ('MO', 'Macao'), ('MK', 'Macedonia'), ('MG', 'Madagascar'), ('MW', 'Malawi'), ('MY', 'Malaysia'), ('MV', 'Maldives'), ('ML', 'Mali'), ('MT', 'Malta'), ('MH', 'Marshall Islands'), ('MQ', 'Martinique'), ('MR', 'Mauritania'), ('MU', 'Mauritius'), ('YT', 'Mayotte'), ('MX', 'Mexico'), ('FM', 'Micronesia'), ('MD', 'Moldova'), ('MC', 'Monaco'), ('MN', 'Mongolia'), ('ME', 'Montenegro'), ('MS', 'Montserrat'), ('MA', 'Morocco'), ('MZ', 'Mozambique'), ('MM', 'Myanmar'), ('NA', 'Namibia'), ('NR', 'Nauru'), ('NP', 'Nepal'), ('NL', 'Netherlands'), ('NC', 'New Caledonia'), ('NZ', 'New Zealand'), ('NI', 'Nicaragua'), ('NE', 'Niger'), ('NG', 'Nigeria'), ('NU', 'Niue'), ('NF', 'Norfolk Island'), ('KP', 'North Korea'), ('MP', 'Northern Mariana Islands'), ('NO', 'Norway'), ('OM', 'Oman'), ('PK', 'Pakistan'), ('PW', 'Palau'), ('PS', 'Palestinian Territory'), ('PA', 'Panama'), ('PG', 'Papua New Guinea'), ('PY', 'Paraguay'), ('PE', 'Peru'), ('PH', 'Philippines'), ('PN', 'Pitcairn'), ('PL', 'Poland'), ('PT', 'Portugal'), ('PR', 'Puerto Rico'), ('QA', 'Qatar'), ('CG', 'Republic of the Congo'), ('RE', 'Reunion'), ('RO', 'Romania'), ('RU', 'Russia'), ('RW', 'Rwanda'), ('BL', 'Saint Barthelemy'), ('SH', 'Saint Helena'), ('KN', 'Saint Kitts and Nevis'), ('LC', 'Saint Lucia'), ('MF', 'Saint Martin'), ('PM', 'Saint Pierre and Miquelon'), ('VC', 'Saint Vincent and the Grenadines'), ('WS', 'Samoa'), ('SM', 'San Marino'), ('ST', 'Sao Tome and Principe'), ('SA', 'Saudi Arabia'), ('SN', 'Senegal'), ('RS', 'Serbia'), ('SC', 'Seychelles'), ('SL', 'Sierra Leone'), ('SG', 'Singapore'), ('SX', 'Sint Maarten'), ('SK', 'Slovakia'), ('SI', 'Slovenia'), ('SB', 'Solomon Islands'), ('SO', 'Somalia'), ('ZA', 'South Africa'), ('GS', 'South Georgia and the South Sandwich Islands'), ('KR', 'South Korea'), ('SS', 'South Sudan'), ('ES', 'Spain'), ('LK', 'Sri Lanka'), ('SD', 'Sudan'), ('SR', 'Suriname'), ('SJ', 'Svalbard and Jan Mayen'), ('SZ', 'Swaziland'), ('SE', 'Sweden'), ('CH', 'Switzerland'), ('SY', 'Syria'), ('TW', 'Taiwan'), ('TJ', 'Tajikistan'), ('TZ', 'Tanzania'), ('TH', 'Thailand'), ('TG', 'Togo'), ('TK', 'Tokelau'), ('TO', 'Tonga'), ('TT', 'Trinidad and Tobago'), ('TN', 'Tunisia'), ('TR', 'Turkey'), ('TM', 'Turkmenistan'), ('TC', 'Turks and Caicos Islands'), ('TV', 'Tuvalu'), ('VI', 'U.S. Virgin Islands'), ('UG', 'Uganda'), ('UA', 'Ukraine'), ('AE', 'United Arab Emirates'), ('GB', 'United Kingdom'), ('US', 'United States'), ('UM', 'United States Minor Outlying Islands'), ('UY', 'Uruguay'), ('UZ', 'Uzbekistan'), ('VU', 'Vanuatu'), ('VA', 'Vatican'), ('VE', 'Venezuela'), ('VN', 'Vietnam'), ('WF', 'Wallis and Futuna'), ('EH', 'Western Sahara'), ('YE', 'Yemen'), ('ZM', 'Zambia'), ('ZW', 'Zimbabwe')], max_length=30)),
                ('institution_country', models.CharField(choices=[('AF', 'Afghanistan'), ('AX', 'Aland Islands'), ('AL', 'Albania'), ('DZ', 'Algeria'), ('AS', 'American Samoa'), ('AD', 'Andorra'), ('AO', 'Angola'), ('AI', 'Anguilla'), ('AQ', 'Antarctica'), ('AG', 'Antigua and Barbuda'), ('AR', 'Argentina'), ('AM', 'Armenia'), ('AW', 'Aruba'), ('AU', 'Australia'), ('AT', 'Austria'), ('AZ', 'Azerbaijan'), ('BS', 'Bahamas'), ('BH', 'Bahrain'), ('BD', 'Bangladesh'), ('BB', 'Barbados'), ('BY', 'Belarus'), ('BE', 'Belgium'), ('BZ', 'Belize'), ('BJ', 'Benin'), ('BM', 'Bermuda'), ('BT', 'Bhutan'), ('BO', 'Bolivia'), ('BQ', 'Bonaire, Saint Eustatius and Saba '), ('BA', 'Bosnia and Herzegovina'), ('BW', 'Botswana'), ('BV', 'Bouvet Island'), ('BR', 'Brazil'), ('IO', 'British Indian Ocean Territory'), ('VG', 'British Virgin Islands'), ('BN', 'Brunei'), ('BG', 'Bulgaria'), ('BF', 'Burkina Faso'), ('BI', 'Burundi'), ('KH', 'Cambodia'), ('CM', 'Cameroon'), ('CA', 'Canada'), ('CV', 'Cape Verde'), ('KY', 'Cayman Islands'), ('CF', 'Central African Republic'), ('TD', 'Chad'), ('CL', 'Chile'), ('CN', 'China'), ('CX', 'Christmas Island'), ('CC', 'Cocos Islands'), ('CO', 'Colombia'), ('KM', 'Comoros'), ('CK', 'Cook Islands'), ('CR', 'Costa Rica'), ('HR', 'Croatia'), ('CU', 'Cuba'), ('CW', 'Curacao'), ('CY', 'Cyprus'), ('CZ', 'Czech Republic'), ('CD', 'Democratic Republic of the Congo'), ('DK', 'Denmark'), ('DJ', 'Djibouti'), ('DM', 'Dominica'), ('DO', 'Dominican Republic'), ('TL', 'East Timor'), ('EC', 'Ecuador'), ('EG', 'Egypt'), ('SV', 'El Salvador'), ('GQ', 'Equatorial Guinea'), ('ER', 'Eritrea'), ('EE', 'Estonia'), ('ET', 'Ethiopia'), ('FK', 'Falkland Islands'), ('FO', 'Faroe Islands'), ('FJ', 'Fiji'), ('FI', 'Finland'), ('FR', 'France'), ('GF', 'French Guiana'), ('PF', 'French Polynesia'), ('TF', 'French Southern Territories'), ('GA', 'Gabon'), ('GM', 'Gambia'), ('GE', 'Georgia'), ('DE', 'Germany'), ('GH', 'Ghana'), ('GI', 'Gibraltar'), ('GR', 'Greece'), ('GL', 'Greenland'), ('GD', 'Grenada'), ('GP', 'Guadeloupe'), ('GU', 'Guam'), ('GT', 'Guatemala'), ('GG', 'Guernsey'), ('GN', 'Guinea'), ('GW', 'Guinea-Bissau'), ('GY', 'Guyana'), ('HT', 'Haiti'), ('HM', 'Heard Island and McDonald Islands'), ('HN', 'Honduras'), ('HK', 'Hong Kong'), ('HU', 'Hungary'), ('IS', 'Iceland'), ('IN', 'India'), ('ID', 'Indonesia'), ('IR', 'Iran'), ('IQ', 'Iraq'), ('IE', 'Ireland'), ('IM', 'Isle of Man'), ('IL', 'Israel'), ('IT', 'Italy'), ('CI', 'Ivory Coast'), ('JM', 'Jamaica'), ('JP', 'Japan'), ('JE', 'Jersey'), ('JO', 'Jordan'), ('KZ', 'Kazakhstan'), ('KE', 'Kenya'), ('KI', 'Kiribati'), ('XK', 'Kosovo'), ('KW', 'Kuwait'), ('KG', 'Kyrgyzstan'), ('LA', 'Laos'), ('LV', 'Latvia'), ('LB', 'Lebanon'), ('LS', 'Lesotho'), ('LR', 'Liberia'), ('LY', 'Libya'), ('LI', 'Liechtenstein'), ('LT', 'Lithuania'), ('LU', 'Luxembourg'), ('MO', 'Macao'), ('MK', 'Macedonia'), ('MG', 'Madagascar'), ('MW', 'Malawi'), ('MY', 'Malaysia'), ('MV', 'Maldives'), ('ML', 'Mali'), ('MT', 'Malta'), ('MH', 'Marshall Islands'), ('MQ', 'Martinique'), ('MR', 'Mauritania'), ('MU', 'Mauritius'), ('YT', 'Mayotte'), ('MX', 'Mexico'), ('FM', 'Micronesia'), ('MD', 'Moldova'), ('MC', 'Monaco'), ('MN', 'Mongolia'), ('ME', 'Montenegro'), ('MS', 'Montserrat'), ('MA', 'Morocco'), ('MZ', 'Mozambique'), ('MM', 'Myanmar'), ('NA', 'Namibia'), ('NR', 'Nauru'), ('NP', 'Nepal'), ('NL', 'Netherlands'), ('NC', 'New Caledonia'), ('NZ', 'New Zealand'), ('NI', 'Nicaragua'), ('NE', 'Niger'), ('NG', 'Nigeria'), ('NU', 'Niue'), ('NF', 'Norfolk Island'), ('KP', 'North Korea'), ('MP', 'Northern Mariana Islands'), ('NO', 'Norway'), ('OM', 'Oman'), ('PK', 'Pakistan'), ('PW', 'Palau'), ('PS', 'Palestinian Territory'), ('PA', 'Panama'), ('PG', 'Papua New Guinea'), ('PY', 'Paraguay'), ('PE', 'Peru'), ('PH', 'Philippines'), ('PN', 'Pitcairn'), ('PL', 'Poland'), ('PT', 'Portugal'), ('PR', 'Puerto Rico'), ('QA', 'Qatar'), ('CG', 'Republic of the Congo'), ('RE', 'Reunion'), ('RO', 'Romania'), ('RU', 'Russia'), ('RW', 'Rwanda'), ('BL', 'Saint Barthelemy'), ('SH', 'Saint Helena'), ('KN', 'Saint Kitts and Nevis'), ('LC', 'Saint Lucia'), ('MF', 'Saint Martin'), ('PM', 'Saint Pierre and Miquelon'), ('VC', 'Saint Vincent and the Grenadines'), ('WS', 'Samoa'), ('SM', 'San Marino'), ('ST', 'Sao Tome and Principe'), ('SA', 'Saudi Arabia'), ('SN', 'Senegal'), ('RS', 'Serbia'), ('SC', 'Seychelles'), ('SL', 'Sierra Leone'), ('SG', 'Singapore'), ('SX', 'Sint Maarten'), ('SK', 'Slovakia'), ('SI', 'Slovenia'), ('SB', 'Solomon Islands'), ('SO', 'Somalia'), ('ZA', 'South Africa'), ('GS', 'South Georgia and the South Sandwich Islands'), ('KR', 'South Korea'), ('SS', 'South Sudan'), ('ES', 'Spain'), ('LK', 'Sri Lanka'), ('SD', 'Sudan'), ('SR', 'Suriname'), ('SJ', 'Svalbard and Jan Mayen'), ('SZ', 'Swaziland'), ('SE', 'Sweden'), ('CH', 'Switzerland'), ('SY', 'Syria'), ('TW', 'Taiwan'), ('TJ', 'Tajikistan'), ('TZ', 'Tanzania'), ('TH', 'Thailand'), ('TG', 'Togo'), ('TK', 'Tokelau'), ('TO', 'Tonga'), ('TT', 'Trinidad and Tobago'), ('TN', 'Tunisia'), ('TR', 'Turkey'), ('TM', 'Turkmenistan'), ('TC', 'Turks and Caicos Islands'), ('TV', 'Tuvalu'), ('VI', 'U.S. Virgin Islands'), ('UG', 'Uganda'), ('UA', 'Ukraine'), ('AE', 'United Arab Emirates'), ('GB', 'United Kingdom'), ('US', 'United States'), ('UM', 'United States Minor Outlying Islands'), ('UY', 'Uruguay'), ('UZ', 'Uzbekistan'), ('VU', 'Vanuatu'), ('VA', 'Vatican'), ('VE', 'Venezuela'), ('VN', 'Vietnam'), ('WF', 'Wallis and Futuna'), ('EH', 'Western Sahara'), ('YE', 'Yemen'), ('ZM', 'Zambia'), ('ZW', 'Zimbabwe')], max_length=30)),
                ('address', models.TextField()),
                ('phone_number', models.CharField(default='', max_length=20)),
                ('abstarct_file', models.FileField(help_text='Browse a file', upload_to=dashboard.models.user_directory_path, validators=[django.core.validators.FileExtensionValidator(['pdf', '.docx', 'rtf'])])),
                ('uploaded_at', models.DateTimeField(blank=True, null=True)),
                ('accept', models.BooleanField(default=False)),
                ('paypal_trans_id', models.CharField(max_length=17)),
                ('user_status', models.CharField(choices=[('waiting', 'Waiting'), ('pending', 'Pending'), ('confirm', 'Confirm'), ('decline', 'Decline')], default='waiting', max_length=30)),
                ('user_type', models.CharField(choices=[('listener', 'Listener'), ('author', 'Author')], default='listener', max_length=30)),
                ('update', models.DateTimeField(auto_now=True)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):

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

    operations = [
        migrations.AlterField(
            model_name='asset',
            name='purchase_date',
            field=models.DateField(blank=True, null=True, validators=[dashboard.models.validate_purchase_date]),
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('ref_code', models.CharField(max_length=100, primary_key=True, serialize=False, unique=True)),
                ('action', models.TextField()),
                ('completed', models.BooleanField(default=False)),
                ('deadline', models.DateTimeField(validators=[dashboard.models.validate_deadline])),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Ejemplo n.º 7
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='BillingInfo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('vat_code',
                 models.CharField(blank=True, max_length=50, null=True)),
                ('company_name',
                 models.CharField(blank=True, max_length=50, null=True)),
                ('payment_point',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('payment_currency',
                 models.CharField(blank=True, max_length=3, null=True)),
                ('address_1',
                 models.CharField(blank=True, max_length=300, null=True)),
                ('address_2',
                 models.CharField(blank=True, max_length=300, null=True)),
                ('city', models.CharField(blank=True,
                                          max_length=300,
                                          null=True)),
                ('state',
                 models.CharField(blank=True, max_length=300, null=True)),
                ('zip', models.CharField(blank=True, max_length=300,
                                         null=True)),
                ('country',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('comments',
                 models.CharField(blank=True, max_length=300, null=True)),
                ('telephone',
                 models.CharField(blank=True, max_length=300, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Hotels',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('hotel_property_id', models.IntegerField(blank=True,
                                                          null=True)),
                ('hotel_status',
                 models.CharField(blank=True, max_length=3, null=True)),
                ('hotel_chain_code',
                 models.CharField(blank=True, max_length=15, null=True)),
                ('hotel_chain_name',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('hotel_name',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('hotel_group',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('address1',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('address2',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('address3',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('postal_city',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('state_code',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('state_name',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('zip', models.CharField(blank=True, max_length=100,
                                         null=True)),
                ('airport_city_code',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('phone_area_zone',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('fax_area_zone',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('Location_name',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('phone',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('hotel_fax',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('hotel_email',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('website',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('country_code',
                 models.CharField(blank=True, max_length=3, null=True)),
                ('country_name',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('world_area_name',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('world_area_code',
                 models.CharField(blank=True, max_length=100, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Inbound',
            fields=[
                ('version', models.CharField(max_length=100)),
                ('uniquebookingid',
                 models.CharField(max_length=100,
                                  primary_key=True,
                                  serialize=False)),
                ('pnr', models.CharField(max_length=10)),
                ('sequnceno', models.CharField(max_length=20)),
                ('createdate', models.CharField(max_length=100)),
                ('modifydate', models.CharField(max_length=100)),
                ('lineno', models.CharField(max_length=100)),
                ('agencyidtype', models.CharField(max_length=100)),
                ('agencyid', models.CharField(max_length=100)),
                ('bookingagent', models.CharField(max_length=100)),
                ('guestname', models.CharField(max_length=100)),
                ('corporateid', models.CharField(max_length=100)),
                ('agentrref1', models.CharField(max_length=100)),
                ('agentrref2', models.CharField(max_length=100)),
                ('agentref3', models.CharField(max_length=100)),
                ('numberofrooms', models.IntegerField(blank=True, null=True)),
                ('numberofnights', models.IntegerField(blank=True, null=True)),
                ('datein', models.DateTimeField(auto_now_add=True, null=True)),
                ('dateout', models.DateTimeField(auto_now_add=True,
                                                 null=True)),
                ('commission_percentage_ob', models.CharField(max_length=100)),
                ('costprnight', models.FloatField()),
                ('fixedcommission', models.CharField(max_length=100)),
                ('currency', models.CharField(max_length=100)),
                ('sales_fare_code', models.CharField(max_length=100)),
                ('cwt_rate_access_code', models.CharField(max_length=100)),
                ('sales_fare_agency_client_id',
                 models.CharField(max_length=100)),
                ('rate_description', models.CharField(max_length=100)),
                ('gds_commission_text', models.CharField(max_length=100)),
                ('accomodationtype', models.CharField(max_length=100)),
                ('confirmaitonnumber', models.CharField(max_length=100)),
                ('hotelpropertyid', models.IntegerField()),
                ('hotel_chain_code', models.CharField(max_length=100)),
                ('hotelname', models.CharField(max_length=100)),
                ('address1', models.CharField(max_length=100)),
                ('address2', models.CharField(max_length=100)),
                ('city', models.CharField(max_length=100)),
                ('state', models.CharField(max_length=100)),
                ('zip', models.CharField(max_length=100)),
                ('airportcitycode', models.CharField(max_length=100)),
                ('phone', models.CharField(max_length=100)),
                ('fax', models.CharField(max_length=100)),
                ('countrycode', models.CharField(max_length=100)),
                ('agentstatuscode', models.CharField(max_length=100)),
                ('agentpaymentcode', models.CharField(max_length=100)),
                ('bookingstatuscode',
                 models.CharField(blank=True, max_length=3, null=True)),
                ('user_id',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('status_date_time',
                 models.DateTimeField(auto_now_add=True, null=True)),
                ('conf_no_rooms', models.IntegerField(blank=True, null=True)),
                ('conf_no_nights', models.IntegerField(blank=True, null=True)),
                ('conf_datein', models.DateTimeField(blank=True, null=True)),
                ('conf_dateout', models.DateTimeField(blank=True, null=True)),
                ('conf_cost_per_nights',
                 models.FloatField(blank=True, null=True)),
                ('conf_currency',
                 models.CharField(blank=True, max_length=3, null=True)),
                ('conf_commission_percentage',
                 models.FloatField(blank=True, null=True)),
                ('is_checkedout', models.BooleanField(default=False)),
                ('is_paid', models.BooleanField(default=False)),
                ('is_payment_validated', models.BooleanField(default=False)),
                ('is_invoiced', models.BooleanField(default=False)),
                ('payment_date', models.DateTimeField(blank=True, null=True)),
                ('paid_commission', models.FloatField(blank=True, null=True)),
                ('vat_amount', models.FloatField(blank=True, null=True)),
                ('paid_currency',
                 models.CharField(blank=True, max_length=3, null=True)),
                ('payment_point',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('payment_status',
                 models.CharField(blank=True, max_length=3, null=True)),
                ('bank_charge_amount', models.FloatField(blank=True,
                                                         null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Invoice',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('status',
                 models.PositiveSmallIntegerField(
                     blank=True,
                     choices=[(1, 'Issued invoice'),
                              (2, 'Pending for accounting'),
                              (3, 'Requested for invoice')],
                     null=True)),
                ('description',
                 models.CharField(blank=True, max_length=200, null=True)),
                ('invoice_number',
                 models.CharField(
                     blank=True,
                     default=dashboard.models.generate_invoice_number,
                     max_length=100,
                     null=True)),
                ('quantity', models.IntegerField(blank=True, null=True)),
                ('price', models.FloatField(blank=True, null=True)),
                ('country',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('country_code',
                 models.CharField(blank=True, max_length=2, null=True)),
                ('timestamp', models.DateTimeField(blank=True, null=True)),
                ('attachment',
                 models.BinaryField(blank=True, max_length=200, null=True)),
                ('issue_date', models.DateTimeField(blank=True, null=True)),
                ('vat_amount', models.FloatField(blank=True, null=True)),
                ('bank_charge_amount', models.FloatField(blank=True,
                                                         null=True)),
            ],
        ),
        migrations.CreateModel(
            name='PaymentInfo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('payment_channel',
                 models.CharField(blank=True, max_length=50, null=True)),
                ('payment_date', models.DateField(blank=True, null=True)),
                ('deposit_date', models.DateField(blank=True, null=True)),
                ('payment_reference',
                 models.CharField(blank=True, max_length=200, null=True)),
                ('payment_doc',
                 models.FileField(blank=True,
                                  null=True,
                                  upload_to='documents/users')),
                ('description',
                 models.CharField(blank=True, max_length=200, null=True)),
                ('paid_commission', models.FloatField(blank=True, null=True)),
                ('paid_currency',
                 models.CharField(blank=True, max_length=3, null=True)),
                ('vat_amount', models.FloatField(blank=True, null=True)),
                ('bank_charge_amount', models.FloatField(blank=True,
                                                         null=True)),
            ],
        ),
        migrations.CreateModel(
            name='User_management',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('company', models.CharField(max_length=100)),
                ('employee_name', models.CharField(max_length=100)),
                ('employee_email', models.EmailField(max_length=254)),
                ('is_suppervisor', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('legal_name', models.CharField(max_length=100)),
                ('address1', models.CharField(max_length=200)),
                ('address2', models.CharField(max_length=200)),
                ('city', models.CharField(max_length=45)),
                ('tax_number', models.CharField(max_length=45)),
                ('contract_start', models.DateField()),
                ('contract_end', models.DateField()),
                ('group_id', models.CharField(max_length=100)),
                ('chain_id', models.CharField(max_length=100)),
                ('property_id', models.CharField(max_length=100)),
                ('scope',
                 multiselectfield.db.fields.MultiSelectField(choices=[
                     ('Global', 'Global'), ('Region', 'Region'),
                     ('Zeone', 'Zone'), ('Country', 'Country')
                 ],
                                                             max_length=27)),
                ('region', models.CharField(max_length=20)),
                ('country', models.CharField(max_length=45)),
            ],
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('role',
                 models.PositiveSmallIntegerField(blank=True,
                                                  choices=[(1, 'Admin'),
                                                           (2, 'Supervisor'),
                                                           (3, 'Employee')],
                                                  null=True)),
                ('first_name', models.CharField(max_length=50, null=True)),
                ('last_name', models.CharField(max_length=50, null=True)),
                ('address',
                 models.CharField(blank=True, max_length=300, null=True)),
                ('city', models.CharField(blank=True, max_length=20,
                                          null=True)),
                ('state', models.CharField(blank=True,
                                           max_length=20,
                                           null=True)),
                ('zip', models.CharField(blank=True, max_length=20,
                                         null=True)),
                ('country',
                 models.CharField(blank=True, max_length=20, null=True)),
                ('telephone',
                 models.CharField(blank=True, max_length=20, null=True)),
                ('website', models.URLField(blank=True, default='',
                                            null=True)),
                ('image',
                 models.FileField(blank=True,
                                  default='images/users/Pic.jpg',
                                  null=True,
                                  upload_to='images/users')),
            ],
        ),
    ]
Ejemplo n.º 8
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('sites', '0002_alter_domain_unique'),
        ('auth', '0008_alter_user_username_max_length'),
        ('contenttypes', '0002_remove_content_type_name'),
    ]

    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')),
                ('email',
                 models.EmailField(max_length=255,
                                   unique=True,
                                   verbose_name='Email Address')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=50,
                                  verbose_name='First Name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=50,
                                  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')),
                ('created_by',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to=settings.AUTH_USER_MODEL)),
                ('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_plural': 'users',
                'db_table': 'user',
                'verbose_name': 'user',
            },
            managers=[
                ('objects', dashboard.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Page',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('page_name',
                 models.CharField(choices=[('index', 'Home'),
                                           ('privacy', 'Privacy'),
                                           ('terms', 'Terms')],
                                  max_length=100)),
                ('page_nav_name',
                 models.CharField(blank=True, max_length=500, null=True)),
                ('page_type',
                 models.CharField(choices=[('landing_page',
                                            'Static Landing Page')],
                                  default='landing_page',
                                  max_length=100)),
                ('title', models.TextField(blank=True, null=True)),
                ('sub_title', models.TextField(blank=True, null=True)),
                ('meta_description', models.TextField(blank=True, null=True)),
                ('meta_keywords', models.TextField(blank=True, null=True)),
                ('published', models.BooleanField(default=True)),
                ('date_published', models.DateTimeField(blank=True,
                                                        null=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('date_edited', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': ['site_info__site__id', 'page_name'],
            },
        ),
        migrations.CreateModel(
            name='PageItem',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('object_id', models.PositiveIntegerField()),
                ('configuration', models.TextField(blank=True, null=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('date_edited', models.DateTimeField(auto_now=True)),
                ('content_type',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='contenttypes.ContentType')),
                ('page',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='dashboard.Page')),
            ],
        ),
        migrations.CreateModel(
            name='SiteFormDataModel',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('domain_name', models.CharField(max_length=150)),
                ('zipcode', models.CharField(db_index=True, max_length=5)),
                ('DOB', models.DateField(verbose_name='Date of Birth')),
                ('gender',
                 models.CharField(choices=[('male', 'male'),
                                           ('female', 'female')],
                                  max_length=50)),
                ('type',
                 models.CharField(choices=[('Self', 'Self'),
                                           ('Family', 'Family')],
                                  max_length=50)),
                ('house_income',
                 models.DecimalField(decimal_places=2, max_digits=20)),
                ('phone', models.TextField()),
                ('firstname',
                 models.CharField(max_length=500, verbose_name='First Name')),
                ('lastname',
                 models.CharField(max_length=500, verbose_name='Last Name')),
                ('email', models.EmailField(db_index=True, max_length=254)),
                ('CSD', models.DateField(verbose_name='Coverage Start Date')),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='SiteInfo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('site_title', models.TextField(blank=True, null=True)),
                ('title_separator',
                 models.CharField(choices=[('|', '|'), ('-', '-')],
                                  default='|',
                                  max_length=10)),
                ('phone_number',
                 models.CharField(blank=True, max_length=20, null=True)),
                ('email_id',
                 models.EmailField(blank=True, max_length=254, null=True)),
                ('main_heading', models.TextField(blank=True, null=True)),
                ('main_heading_sub', models.TextField(blank=True, null=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('date_edited', models.DateTimeField(auto_now=True)),
                ('published', models.BooleanField(default=True)),
                ('site',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='sites.Site',
                                   unique=True)),
            ],
            options={
                'ordering': ['site__id'],
                'verbose_name': 'Site Info',
            },
        ),
        migrations.AddField(
            model_name='page',
            name='site_info',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='dashboard.SiteInfo'),
        ),
        migrations.AlterUniqueTogether(
            name='pageitem',
            unique_together=set([('page', 'object_id')]),
        ),
        migrations.AlterUniqueTogether(
            name='page',
            unique_together=set([('site_info', 'page_name')]),
        ),
    ]
Ejemplo n.º 9
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')),
                ('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.ASCIIUsernameValidator(
                         )
                     ],
                     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')),
                ('user_type',
                 models.PositiveSmallIntegerField(choices=[(1, 'Private User'),
                                                           (2, 'Company User'),
                                                           (3, 'Employee User')
                                                           ],
                                                  editable=False,
                                                  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,
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='AudioFile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('upload_datetime', models.DateTimeField(auto_now_add=True)),
                ('file',
                 models.FileField(
                     editable=False,
                     upload_to=dashboard.models._get_relative_file_path)),
                ('is_public', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=256)),
                ('description', models.CharField(blank=True, max_length=500)),
                ('language_spoken',
                 models.CharField(choices=[
                     ('af', 'Afrikaans'), ('ar', 'Arabic'),
                     ('ast', 'Asturian'), ('az', 'Azerbaijani'),
                     ('bg', 'Bulgarian'), ('be', 'Belarusian'),
                     ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'),
                     ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'),
                     ('da', 'Danish'), ('de', 'German'),
                     ('dsb', 'Lower Sorbian'), ('el', 'Greek'),
                     ('en', 'English'), ('en-au', 'Australian English'),
                     ('en-gb', 'British English'), ('eo', 'Esperanto'),
                     ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'),
                     ('es-co', 'Colombian Spanish'),
                     ('es-mx', 'Mexican Spanish'),
                     ('es-ni', 'Nicaraguan Spanish'),
                     ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'),
                     ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'),
                     ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'),
                     ('gd', 'Scottish Gaelic'), ('gl', 'Galician'),
                     ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'),
                     ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'),
                     ('ia', 'Interlingua'),
                     ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'),
                     ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'),
                     ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'),
                     ('ko', 'Korean'), ('lb', 'Luxembourgish'),
                     ('lt', 'Lithuanian'), ('lv', 'Latvian'),
                     ('mk', 'Macedonian'), ('ml', 'Malayalam'),
                     ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'),
                     ('nb', 'Norwegian Bokm\xe5l'), ('ne', 'Nepali'),
                     ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'),
                     ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'),
                     ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'),
                     ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'),
                     ('sl', 'Slovenian'), ('sq', 'Albanian'),
                     ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'),
                     ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'),
                     ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'),
                     ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'),
                     ('ur', 'Urdu'), ('vi', 'Vietnamese'),
                     ('zh-hans', 'Simplified Chinese'),
                     ('zh-hant', 'Traditional Chinese')
                 ],
                                  editable=False,
                                  max_length=5)),
                ('duration', models.DurationField(editable=False)),
                ('uploader',
                 models.ForeignKey(editable=False,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='files',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('vat_no',
                 models.CharField(
                     max_length=30,
                     unique=True,
                     validators=[vatno_validator.validators.VATNoValidator()
                                 ])),
            ],
        ),
        migrations.CreateModel(
            name='CompanyUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('phone_number',
                 phonenumber_field.modelfields.PhoneNumberField(
                     max_length=128)),
                ('company',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='contact_person',
                     to='dashboard.Company')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='company_user',
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CreditsPacketOffer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date_start', models.DateField(default=datetime.date.today)),
                ('date_end', models.DateField(blank=True, null=True)),
                ('minutes_per_credit',
                 models.PositiveSmallIntegerField(validators=[
                     django.core.validators.MinValueValidator(
                         5, 'Cannot set minutes per credit value less than 5'),
                     django.core.validators.MaxValueValidator(
                         60,
                         'Cannot set minutes per credit value greater than 60')
                 ])),
                ('cost_per_credit', models.FloatField()),
            ],
        ),
        migrations.CreateModel(
            name='CreditsPacketPurchase',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('datetime', models.DateTimeField(auto_now_add=True)),
                ('expiration_date', models.DateField()),
                ('credits_purchased',
                 models.PositiveSmallIntegerField(validators=[
                     django.core.validators.MinValueValidator(
                         1, 'You cannot buy less than 1 credit')
                 ])),
                ('credits_remaining', models.PositiveSmallIntegerField()),
                ('customer',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='purchases',
                     to=settings.AUTH_USER_MODEL)),
                ('offer',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='purchases',
                                   to='dashboard.CreditsPacketOffer')),
            ],
        ),
        migrations.CreateModel(
            name='EmployeeUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('company',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='employees',
                                   to='dashboard.Company')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='employee_user',
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PrivateUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='private_user',
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Transcription',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('offset', models.DurationField()),
                ('confidence', models.FloatField()),
                ('text', models.TextField(blank=True)),
                ('file',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='transcriptions',
                                   to='dashboard.AudioFile')),
            ],
        ),
    ]
Ejemplo n.º 10
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('street',
                 models.CharField(default='38 Windsor Street', max_length=85)),
                ('zip', models.CharField(default='06001', max_length=12)),
            ],
        ),
        migrations.CreateModel(
            name='DeviceModels',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(default='generic device', max_length=50)),
                ('max_life', models.PositiveIntegerField()),
                ('warranty_days', models.PositiveIntegerField()),
                ('image',
                 models.ImageField(blank=True,
                                   default='default.jpg',
                                   null=True,
                                   upload_to='device_catalogue')),
                ('energy_rating',
                 models.PositiveIntegerField(validators=[
                     django.core.validators.MinValueValidator(1),
                     django.core.validators.MaxValueValidator(10)
                 ])),
                ('safety_rating',
                 models.IntegerField(validators=[
                     django.core.validators.MinValueValidator(1),
                     django.core.validators.MaxValueValidator(10)
                 ])),
                ('current_consumption', models.IntegerField()),
                ('model_number', models.CharField(max_length=50)),
                ('serial_number', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Home',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('address',
                 models.ForeignKey(default=dashboard.models.Address(),
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='dashboard.Address')),
                ('owner',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='SubscribersList',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(default='my coffee machine',
                                  max_length=150)),
                ('email', models.EmailField(max_length=254)),
            ],
        ),
        migrations.CreateModel(
            name='ValueStream',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('description',
                 models.CharField(default='value stream description',
                                  max_length=50)),
                ('property_name',
                 models.CharField(default='default property name',
                                  max_length=25)),
                ('value', models.FloatField(default=0.0)),
                ('ts', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Thing',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('description',
                 models.CharField(default='my smart coffee machine',
                                  max_length=120)),
                ('purchase_date', models.DateField()),
                ('life_used', models.IntegerField()),
                ('device_model_info',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='dashboard.DeviceModels')),
                ('installed_home_id',
                 models.ManyToManyField(to='dashboard.Home')),
                ('owner',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to=settings.AUTH_USER_MODEL)),
                ('value_stream_id',
                 models.ManyToManyField(to='dashboard.ValueStream')),
            ],
        ),
        migrations.CreateModel(
            name='ServiceProvider',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(default='generic manufacturer',
                                  max_length=150)),
                ('phone_number', models.CharField(default='0000',
                                                  max_length=14)),
                ('address',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='dashboard.Address')),
                ('type_of_device_handled',
                 models.ManyToManyField(to='dashboard.DeviceModels')),
            ],
        ),
        migrations.CreateModel(
            name='ServiceDetails',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('receipt_email', models.EmailField(max_length=254)),
                ('date_of_service',
                 models.DateField(default=django.utils.timezone.now)),
                ('remarks', models.TextField(default='Service completed')),
                ('service_provider',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='dashboard.ServiceProvider')),
                ('thing',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to='dashboard.Thing')),
            ],
        ),
        migrations.CreateModel(
            name='Seller',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(default='generic seller', max_length=150)),
                ('phone_number', models.CharField(default='007',
                                                  max_length=14)),
                ('address',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.PROTECT,
                     to='dashboard.Address')),
                ('type_of_device_sold',
                 models.ManyToManyField(to='dashboard.DeviceModels')),
            ],
        ),
        migrations.CreateModel(
            name='Manufacturer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(default='generic manufacturer',
                                  max_length=50)),
                ('is_certified', models.BooleanField(default=True)),
                ('phone_number', models.CharField(default='007',
                                                  max_length=14)),
                ('address',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='dashboard.Address')),
            ],
        ),
        migrations.AddField(
            model_name='devicemodels',
            name='mfg',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.DO_NOTHING,
                to='dashboard.Manufacturer'),
        ),
    ]
Ejemplo n.º 11
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='CacheAPI',
            fields=[
                ('cache_api_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('base_url', models.URLField(max_length=800)),
                ('resource', models.CharField(max_length=200)),
                ('request_args',
                 django.contrib.postgres.fields.ArrayField(
                     base_field=models.CharField(blank=True, max_length=400),
                     default=list,
                     size=None)),
                ('request_kwargs', models.CharField(max_length=1000)),
                ('response_content', models.TextField(max_length=10000)),
                ('response_content_json_str',
                 models.TextField(blank=True, null=True)),
                ('expiry', models.DateTimeField()),
            ],
            options={
                'db_table': 'ts_cacheapi',
            },
            bases=(dashboard.models.ModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='GraphRule',
            fields=[
                ('graph_rule_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('rule_name', models.CharField(max_length=1000, unique=True)),
                ('rule_packages',
                 django.contrib.postgres.fields.ArrayField(
                     base_field=models.CharField(blank=True, max_length=1000),
                     default=list,
                     size=None)),
                ('rule_languages',
                 django.contrib.postgres.fields.ArrayField(
                     base_field=models.CharField(blank=True, max_length=400),
                     default=list,
                     size=None)),
                ('created_on', models.DateTimeField()),
                ('rule_status', models.BooleanField(default=True)),
                ('rule_visibility_public', models.BooleanField(default=False)),
                ('created_by', models.EmailField(max_length=254, null=True)),
            ],
            options={
                'verbose_name': 'Graph Rule',
                'db_table': 'ts_graphrules',
            },
        ),
        migrations.CreateModel(
            name='Job',
            fields=[
                ('job_id', models.AutoField(primary_key=True,
                                            serialize=False)),
                ('job_uuid',
                 models.UUIDField(default=uuid.uuid4, editable=False)),
                ('job_type', models.CharField(max_length=200)),
                ('job_start_time', models.DateTimeField()),
                ('job_end_time', models.DateTimeField(null=True)),
                ('job_yml_text',
                 models.CharField(blank=True, max_length=2000, null=True)),
                ('job_log_json_str', models.TextField(blank=True, null=True)),
                ('job_result', models.NullBooleanField()),
                ('job_remarks', models.CharField(max_length=200, null=True)),
                ('job_params_json_str', models.TextField(blank=True,
                                                         null=True)),
                ('job_output_json_str', models.TextField(blank=True,
                                                         null=True)),
                ('triggered_by', models.EmailField(max_length=254, null=True)),
                ('job_visible_on_url', models.BooleanField(default=False)),
            ],
            options={
                'verbose_name': 'Job',
                'db_table': 'ts_jobs',
            },
            bases=(dashboard.models.ModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='JobTemplate',
            fields=[
                ('job_template_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('job_template_type',
                 models.CharField(max_length=100, unique=True)),
                ('job_template_name', models.CharField(max_length=500)),
                ('job_template_desc',
                 models.CharField(blank=True, max_length=1000, null=True)),
                ('job_template_params',
                 django.contrib.postgres.fields.ArrayField(
                     base_field=models.CharField(blank=True, max_length=1000),
                     default=list,
                     size=None)),
                ('job_template_json_str',
                 models.TextField(blank=True, null=True)),
                ('job_template_last_accessed',
                 models.DateTimeField(null=True)),
            ],
            options={
                'verbose_name': 'Job Template',
                'db_table': 'ts_jobtemplates',
            },
            bases=(dashboard.models.ModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='Language',
            fields=[
                ('locale_id',
                 models.CharField(max_length=50,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='Locale ID')),
                ('lang_name',
                 models.CharField(max_length=400,
                                  unique=True,
                                  verbose_name='Language Name')),
                ('locale_alias',
                 models.CharField(blank=True,
                                  max_length=50,
                                  null=True,
                                  unique=True,
                                  verbose_name='Locale Alias')),
                ('locale_script',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='Locale Script')),
                ('lang_status',
                 models.BooleanField(verbose_name='Enable/Disable')),
            ],
            options={
                'verbose_name': 'Language',
                'db_table': 'ts_languages',
            },
        ),
        migrations.CreateModel(
            name='LanguageSet',
            fields=[
                ('lang_set_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('lang_set_name',
                 models.CharField(max_length=1000,
                                  verbose_name='Language Set Name')),
                ('lang_set_slug',
                 models.CharField(max_length=400,
                                  unique=True,
                                  verbose_name='Language Set SLUG')),
                ('lang_set_color',
                 models.CharField(max_length=100,
                                  unique=True,
                                  verbose_name='Tag Colour')),
                ('locale_ids',
                 django.contrib.postgres.fields.ArrayField(
                     base_field=models.CharField(blank=True, max_length=50),
                     default=list,
                     null=True,
                     size=None,
                     verbose_name='Locale IDs')),
            ],
            options={
                'verbose_name': 'Language Set',
                'db_table': 'ts_langset',
            },
        ),
        migrations.CreateModel(
            name='Package',
            fields=[
                ('package_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('package_name',
                 models.CharField(max_length=1000,
                                  unique=True,
                                  verbose_name='Package Name')),
                ('upstream_name',
                 models.CharField(blank=True,
                                  max_length=1000,
                                  null=True,
                                  verbose_name='Upstream Name')),
                ('component',
                 models.CharField(blank=True,
                                  max_length=200,
                                  null=True,
                                  verbose_name='Component')),
                ('upstream_url',
                 models.URLField(max_length=2000,
                                 unique=True,
                                 verbose_name='Upstream URL')),
                ('platform_name',
                 models.CharField(
                     blank=True,
                     max_length=1000,
                     null=True,
                     verbose_name='Package Name at Translation Platform')),
                ('platform_url',
                 models.URLField(
                     blank=True,
                     max_length=500,
                     null=True,
                     verbose_name='Translation Platform Project URL')),
                ('products',
                 django.contrib.postgres.fields.ArrayField(
                     base_field=models.CharField(blank=True, max_length=400),
                     default=list,
                     null=True,
                     size=None,
                     verbose_name='Release Streams')),
                ('package_details_json_str',
                 models.TextField(blank=True, null=True)),
                ('details_json_last_updated', models.DateTimeField(null=True)),
                ('package_name_mapping_json_str',
                 models.TextField(blank=True, null=True)),
                ('name_map_last_updated',
                 models.DateTimeField(blank=True, null=True)),
                ('release_branch_mapping',
                 models.TextField(blank=True, null=True)),
                ('release_branch_map_last_updated',
                 models.DateTimeField(blank=True, null=True)),
                ('stats_diff', models.TextField(blank=True, null=True)),
                ('stats_diff_last_updated',
                 models.DateTimeField(blank=True, null=True)),
                ('platform_last_updated',
                 models.DateTimeField(blank=True, null=True)),
                ('upstream_last_updated',
                 models.DateTimeField(blank=True, null=True)),
                ('downstream_last_updated',
                 models.DateTimeField(blank=True, null=True)),
                ('translation_file_ext',
                 models.CharField(blank=True,
                                  default='po',
                                  max_length=10,
                                  null=True,
                                  verbose_name='Translation Format (po)')),
                ('created_by', models.EmailField(max_length=254, null=True)),
                ('maintainers', models.TextField(blank=True, null=True)),
            ],
            options={
                'verbose_name': 'Package',
                'db_table': 'ts_packages',
            },
            bases=(dashboard.models.ModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='PackageSet',
            fields=[
                ('package_set_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('package_set_name',
                 models.CharField(max_length=1000,
                                  verbose_name='Package Set Name')),
                ('package_set_slug',
                 models.CharField(max_length=400,
                                  unique=True,
                                  verbose_name='Package Set SLUG')),
                ('package_set_color',
                 models.CharField(max_length=100,
                                  unique=True,
                                  verbose_name='Tag Colour')),
                ('packages',
                 models.TextField(blank=True,
                                  null=True,
                                  verbose_name='Packages')),
            ],
            options={
                'verbose_name': 'Package Set',
                'db_table': 'ts_packageset',
            },
        ),
        migrations.CreateModel(
            name='Platform',
            fields=[
                ('platform_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('engine_name',
                 models.CharField(max_length=200,
                                  verbose_name='Platform Engine')),
                ('subject',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='Platform Subject')),
                ('api_url',
                 models.URLField(max_length=500,
                                 unique=True,
                                 verbose_name='Server URL')),
                ('platform_slug',
                 models.CharField(max_length=400,
                                  unique=True,
                                  verbose_name='Platform SLUG')),
                ('server_status',
                 models.BooleanField(verbose_name='Enable/Disable')),
                ('projects_json_str', models.TextField(blank=True, null=True)),
                ('projects_last_updated', models.DateTimeField(null=True)),
                ('auth_login_id',
                 models.CharField(blank=True,
                                  max_length=200,
                                  null=True,
                                  verbose_name='Auth User')),
                ('auth_token_key',
                 models.CharField(blank=True,
                                  max_length=200,
                                  null=True,
                                  verbose_name='Auth Token')),
            ],
            options={
                'verbose_name': 'Translation Platform',
                'db_table': 'ts_platforms',
            },
            bases=(dashboard.models.ModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('product_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('product_name',
                 models.CharField(max_length=200,
                                  verbose_name='Product Name')),
                ('product_slug',
                 models.CharField(max_length=400,
                                  unique=True,
                                  verbose_name='Product SLUG')),
                ('product_server',
                 models.URLField(max_length=500,
                                 unique=True,
                                 verbose_name='Product Server')),
                ('product_build_system',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='Release Build System')),
                ('product_build_tags',
                 django.contrib.postgres.fields.ArrayField(
                     base_field=models.CharField(blank=True, max_length=200),
                     default=list,
                     null=True,
                     size=None,
                     verbose_name='Release Build Tags')),
                ('product_build_tags_last_updated',
                 models.DateTimeField(null=True)),
                ('src_pkg_format',
                 models.CharField(max_length=50,
                                  null=True,
                                  verbose_name='Source Package Format')),
                ('top_url',
                 models.URLField(max_length=500,
                                 unique=True,
                                 verbose_name='Top URL')),
                ('web_url',
                 models.URLField(max_length=500,
                                 null=True,
                                 unique=True,
                                 verbose_name='Web URL')),
                ('krb_service',
                 models.CharField(blank=True,
                                  max_length=200,
                                  null=True,
                                  verbose_name='Kerberos Service')),
                ('auth_type',
                 models.CharField(blank=True,
                                  max_length=200,
                                  null=True,
                                  verbose_name='Auth Type')),
                ('amqp_server',
                 models.CharField(blank=True,
                                  max_length=500,
                                  null=True,
                                  verbose_name='AMQP Server')),
                ('msgbus_exchange',
                 models.CharField(blank=True,
                                  max_length=200,
                                  null=True,
                                  verbose_name='Message Bus Exchange')),
                ('major_milestones',
                 django.contrib.postgres.fields.ArrayField(
                     base_field=models.CharField(blank=True, max_length=1000),
                     default=list,
                     null=True,
                     size=None,
                     verbose_name='Major Milestones')),
                ('product_phases',
                 django.contrib.postgres.fields.ArrayField(
                     base_field=models.CharField(blank=True, max_length=200),
                     default=list,
                     null=True,
                     size=None,
                     verbose_name='Release Stream Phases')),
                ('product_status',
                 models.BooleanField(verbose_name='Enable/Disable')),
            ],
            options={
                'verbose_name': 'Product',
                'db_table': 'ts_products',
            },
        ),
        migrations.CreateModel(
            name='Release',
            fields=[
                ('release_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('release_name',
                 models.CharField(max_length=500,
                                  verbose_name='Release Name')),
                ('release_slug',
                 models.CharField(max_length=500,
                                  unique=True,
                                  verbose_name='Release SLUG')),
                ('scm_branch',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='SCM Branch Name')),
                ('created_on', models.DateTimeField()),
                ('current_phase',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='Current Phase')),
                ('calendar_url',
                 models.URLField(max_length=500,
                                 null=True,
                                 unique=True,
                                 verbose_name='Calender iCal URL')),
                ('schedule_json_str', models.TextField(blank=True, null=True)),
                ('sync_calendar',
                 models.BooleanField(default=True,
                                     verbose_name='Sync Calender')),
                ('notifications_flag',
                 models.BooleanField(default=True,
                                     verbose_name='Notification')),
                ('track_trans_flag',
                 models.BooleanField(default=True,
                                     verbose_name='Track Translation')),
                ('created_by', models.EmailField(max_length=254, null=True)),
                ('language_set_slug',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='dashboard.LanguageSet',
                                   to_field='lang_set_slug',
                                   verbose_name='Language Set')),
                ('product_slug',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='dashboard.Product',
                                   to_field='product_slug',
                                   verbose_name='Product')),
            ],
            options={
                'verbose_name_plural': 'Release',
                'db_table': 'ts_releases',
            },
            bases=(dashboard.models.ModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='Report',
            fields=[
                ('reports_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('report_subject', models.CharField(max_length=200,
                                                    unique=True)),
                ('report_json_str', models.TextField(blank=True, null=True)),
                ('report_updated', models.DateTimeField(null=True)),
            ],
            options={
                'verbose_name': 'Report',
                'db_table': 'ts_reports',
            },
            bases=(dashboard.models.ModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='SyncStats',
            fields=[
                ('sync_id', models.AutoField(primary_key=True,
                                             serialize=False)),
                ('job_uuid', models.UUIDField()),
                ('project_version', models.CharField(max_length=500,
                                                     null=True)),
                ('source', models.CharField(max_length=500, null=True)),
                ('stats_raw_json_str', models.TextField(blank=True,
                                                        null=True)),
                ('stats_processed_json_str',
                 models.TextField(blank=True, null=True)),
                ('sync_iter_count', models.IntegerField()),
                ('sync_visibility', models.BooleanField()),
                ('package_name',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='dashboard.Package',
                                   to_field='package_name',
                                   verbose_name='Package')),
            ],
            options={
                'db_table': 'ts_syncstats',
            },
            bases=(dashboard.models.ModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='Visitor',
            fields=[
                ('visitor_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('visitor_ip', models.GenericIPAddressField()),
                ('visitor_user_agent', models.CharField(max_length=500)),
                ('visitor_accept',
                 models.CharField(blank=True, max_length=500, null=True)),
                ('visitor_encoding',
                 models.CharField(blank=True, max_length=500, null=True)),
                ('visitor_language',
                 models.CharField(blank=True, max_length=500, null=True)),
                ('visitor_host',
                 models.CharField(blank=True, max_length=500, null=True)),
                ('first_visit_time', models.DateTimeField()),
                ('last_visit_time', models.DateTimeField()),
            ],
            options={
                'verbose_name': 'Visitor',
                'db_table': 'ts_visitors',
            },
        ),
        migrations.AddField(
            model_name='package',
            name='platform_slug',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                to='dashboard.Platform',
                to_field='platform_slug',
                verbose_name='Translation Platform'),
        ),
        migrations.AddField(
            model_name='job',
            name='job_template',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to='dashboard.JobTemplate',
                verbose_name='Job Template'),
        ),
        migrations.AddField(
            model_name='graphrule',
            name='rule_release_slug',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                to='dashboard.Release',
                to_field='release_slug',
                verbose_name='Graph Rule for Release'),
        ),
    ]
Ejemplo n.º 12
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='BannerImage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('image', models.ImageField(upload_to='gallery/banner')),
                ('description', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='ContributionList',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('date', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='EventGallary',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('date', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='EventType',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(max_length=100,
                                  verbose_name='Event type name')),
            ],
        ),
        migrations.CreateModel(
            name='ExpenseList',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('date', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='ExpenseType',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(max_length=100,
                                  verbose_name='Expense type name')),
            ],
        ),
        migrations.CreateModel(
            name='UsefulLink',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('link', models.CharField(max_length=500)),
            ],
        ),
        migrations.CreateModel(
            name='MonthlyExpense',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date', models.DateField(blank=True, null=True)),
                ('ExpenseAmount',
                 models.IntegerField(default=100,
                                     verbose_name='Expense Amount')),
                ('EventCategory',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='dashboard.EventType')),
                ('ExpenseCategory',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='dashboard.ExpenseType')),
                ('ExpenseTitle',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='dashboard.ExpenseList')),
                ('whos',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='account.TeamMember')),
            ],
        ),
        migrations.CreateModel(
            name='MonthlyContribution',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date', models.DateField(blank=True, null=True)),
                ('amount', models.IntegerField(default=100)),
                ('paid', models.BooleanField()),
                ('contri_title',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='dashboard.ContributionList')),
                ('user',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='account.TeamMember')),
            ],
        ),
        migrations.CreateModel(
            name='GallaryUploadImage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(
                     upload_to=dashboard.models.image_directory_path)),
                ('title',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='dashboard.EventGallary')),
            ],
        ),
        migrations.AddField(
            model_name='eventgallary',
            name='event',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='dashboard.EventType'),
        ),
    ]
Ejemplo n.º 13
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Files',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  help_text='Unique ID for each uploaded file',
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='Unique ID')),
                ('name',
                 models.CharField(
                     help_text=
                     'Enter a name for the file (less than 100 characters)',
                     max_length=100,
                     verbose_name='File Name')),
                ('file',
                 models.FileField(upload_to=dashboard.models.user_upload_path,
                                  verbose_name='Uploaded File')),
                ('file_type',
                 models.CharField(choices=[('v', 'Video'), ('t', 'Text'),
                                           ('o', 'Voice'), ('i', 'Image'),
                                           ('u', 'Unclassified')],
                                  default='u',
                                  max_length=1,
                                  verbose_name='File Type')),
                ('upload_datetime',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Upload Datetime')),
                ('deleted',
                 models.BooleanField(default=False,
                                     verbose_name='Is Deleted')),
                ('delete_datetime',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='Deletion Datetime')),
                ('count_analyzed',
                 models.IntegerField(default=0,
                                     verbose_name='Count of Analysis')),
                ('delete_by',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='delete_by',
                     to=settings.AUTH_USER_MODEL)),
                ('upload_by',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='upload_by',
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-upload_datetime'],
                'permissions': (('can_view_any_file', 'View Any File'),
                                ('can_delete_any_file', 'Delete Any File')),
            },
        ),
        migrations.CreateModel(
            name='ImageMetrics',
            fields=[
                ('id',
                 models.UUIDField(
                     default=uuid.uuid4,
                     help_text='Unique Id for each file analysis record',
                     primary_key=True,
                     serialize=False,
                     verbose_name='Unique ID')),
                ('calc_status',
                 models.CharField(choices=[('s', 'Success'), ('e', 'Error')],
                                  max_length=1,
                                  null=True,
                                  verbose_name='Analysis Status')),
                ('marked_image',
                 models.FileField(null=True,
                                  upload_to=dashboard.models.marked_file_path,
                                  verbose_name='Marked Image')),
                ('create_datetime',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Creation Datetime')),
                ('file_id',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='dashboard.Files')),
            ],
            options={
                'ordering': ['-create_datetime'],
            },
        ),
        migrations.CreateModel(
            name='VideoMetrics',
            fields=[
                ('id',
                 models.UUIDField(
                     default=uuid.uuid4,
                     help_text='Unique Id for each file analysis record',
                     primary_key=True,
                     serialize=False,
                     verbose_name='Unique ID')),
                ('calc_status',
                 models.CharField(choices=[('s', 'Success'), ('e', 'Error')],
                                  max_length=1,
                                  null=True,
                                  verbose_name='Analysis Status')),
                ('marked_video',
                 models.FileField(null=True,
                                  upload_to=dashboard.models.marked_file_path,
                                  verbose_name='Marked Video')),
                ('frame_num',
                 models.IntegerField(null=True,
                                     verbose_name='Number of Frames')),
                ('fps',
                 models.FloatField(null=True,
                                   verbose_name='Frame per Second')),
                ('blink_count',
                 models.IntegerField(help_text='Number of blinks in the video',
                                     null=True,
                                     verbose_name='Number of Blinks')),
                ('transcript',
                 models.TextField(
                     blank=True,
                     help_text='Transcript of the speach in the video',
                     max_length=10000,
                     null=True,
                     verbose_name='Video Transcript')),
                ('create_datetime',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Creation Datetime')),
                ('file_id',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='dashboard.Files')),
            ],
            options={
                'ordering': ['-create_datetime'],
                'permissions': (('can_view_any_metric', 'View Any Metric'),
                                ('can_edit_any_metric', 'Edit Any Metric')),
            },
        ),
    ]
Ejemplo n.º 14
0
class Migration(migrations.Migration):

    dependencies = [
        ('dashboard', '0003_newsite_config'),
    ]

    operations = [
        migrations.AlterField(
            model_name='newsitem',
            name='author',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='author', to='coredata.Person'),
        ),
        migrations.AlterField(
            model_name='newsitem',
            name='content',
            field=models.TextField(help_text='Main story content'),
        ),
        migrations.AlterField(
            model_name='newsitem',
            name='course',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='coredata.CourseOffering'),
        ),
        migrations.AlterField(
            model_name='newsitem',
            name='read',
            field=models.BooleanField(default=False, help_text='The user has marked the story read'),
        ),
        migrations.AlterField(
            model_name='newsitem',
            name='source_app',
            field=models.CharField(help_text='Application that created the story', max_length=20),
        ),
        migrations.AlterField(
            model_name='newsitem',
            name='title',
            field=models.CharField(help_text='Story title (plain text)', max_length=100),
        ),
        migrations.AlterField(
            model_name='newsitem',
            name='url',
            field=models.URLField(blank=True, help_text='absolute URL for the item: starts with "http://" or "/"', verbose_name='URL'),
        ),
        migrations.AlterField(
            model_name='newsitem',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='user', to='coredata.Person'),
        ),
        migrations.AlterField(
            model_name='signature',
            name='sig',
            field=models.FileField(max_length=500, storage=django.core.files.storage.FileSystemStorage(base_url=None, location='submitted_files'), upload_to=dashboard.models._sig_upload_to),
        ),
        migrations.AlterField(
            model_name='signature',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='coredata.Person'),
        ),
        migrations.AlterField(
            model_name='userconfig',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='coredata.Person'),
        ),
        migrations.AlterField(
            model_name='userconfig',
            name='value',
            field=courselib.json_fields.JSONField(default=dict),
        ),
    ]
Ejemplo n.º 15
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('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')),
                ('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')),
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('creation_date', models.DateTimeField(auto_now_add=True)),
                ('email', models.CharField(max_length=200, unique=True)),
                ('c_credentials', models.TextField()),
                ('salt', models.CharField(max_length=512)),
                ('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',
                'abstract': False,
            },
            managers=[
                ('objects', dashboard.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='App',
            fields=[
                ('id',
                 models.CharField(default=cloud.shortuuid.uuid,
                                  editable=False,
                                  max_length=255,
                                  primary_key=True,
                                  serialize=False)),
                ('creation_date', models.DateTimeField(auto_now_add=True)),
                ('name', models.CharField(max_length=255)),
                ('vendor', models.CharField(default='aws', max_length=255)),
                ('user',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id',
                 models.CharField(default=cloud.shortuuid.uuid,
                                  editable=False,
                                  max_length=255,
                                  primary_key=True,
                                  serialize=False)),
                ('creation_date', models.DateTimeField(auto_now_add=True)),
                ('description', models.CharField(editable=False,
                                                 max_length=255)),
                ('target', models.CharField(editable=False, max_length=255)),
                ('action', models.CharField(max_length=255)),
                ('amount', models.FloatField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Log',
            fields=[
                ('id',
                 models.CharField(default=cloud.shortuuid.uuid,
                                  editable=False,
                                  max_length=255,
                                  primary_key=True,
                                  serialize=False)),
                ('creation_date', models.DateTimeField(auto_now_add=True)),
                ('level', models.CharField(max_length=255)),
                ('event', models.TextField()),
                ('user',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='MarketplaceLogic',
            fields=[
                ('id',
                 models.CharField(default=cloud.shortuuid.uuid,
                                  editable=False,
                                  max_length=255,
                                  primary_key=True,
                                  serialize=False)),
                ('creation_date', models.DateTimeField(auto_now_add=True)),
                ('title', models.CharField(max_length=255)),
                ('category', models.CharField(max_length=255)),
                ('description', models.TextField()),
                ('content', models.TextField()),
                ('logo_image',
                 models.ImageField(null=True,
                                   upload_to='marketplace_logic_logo_image')),
                ('function_zip_file',
                 models.FileField(null=True,
                                  upload_to='marketplace_logic_function_zip')),
                ('function_name', models.CharField(max_length=255, null=True)),
                ('handler', models.CharField(max_length=255)),
                ('runtime', models.CharField(max_length=255)),
                ('verified', models.BooleanField(default=False)),
                ('view_count', models.BigIntegerField(default=0)),
                ('setup_count', models.BigIntegerField(default=0)),
                ('price', models.BigIntegerField(default=0)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Tracker',
            fields=[
                ('id',
                 models.CharField(default=cloud.shortuuid.uuid,
                                  editable=False,
                                  max_length=255,
                                  primary_key=True,
                                  serialize=False)),
                ('creation_date', models.DateTimeField(auto_now_add=True)),
                ('funnel', models.CharField(max_length=255, null=True)),
                ('user',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='event',
            name='tracker',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='dashboard.Tracker'),
        ),
        migrations.AddField(
            model_name='event',
            name='user',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
    ]
Ejemplo n.º 16
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        ('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')),
                ('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')),
                ('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')),
                ('email',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='Email')),
                ('phone_number',
                 models.CharField(
                     blank=True,
                     help_text=
                     'User Phone Number, example: 09123456790 (Optional)',
                     max_length=11,
                     null=True,
                     unique=True,
                     validators=[dashboard.models.phone_number_validator],
                     verbose_name='Phone Number')),
                ('is_premium',
                 models.BooleanField(default=False, verbose_name='Premium')),
                ('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',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Action',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('type',
                 models.CharField(choices=[('link created', 'Link Created'),
                                           ('link updated', 'Link Updated'),
                                           ('link reported', 'Link Reported'),
                                           ('contact_us', 'Contact Us')],
                                  max_length=20,
                                  verbose_name='Type of Action')),
                ('is_read', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('object_id',
                 models.PositiveIntegerField(db_index=True,
                                             verbose_name='object id')),
                ('content_type',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='contenttypes.ContentType',
                                   verbose_name='content type')),
            ],
            options={
                'ordering': ('-updated', ),
            },
        ),
    ]
Ejemplo n.º 17
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Attachment',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('file',
                 models.FileField(
                     blank=True,
                     upload_to=dashboard.models.attachment_directory_path)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=20)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('content', models.TextField(blank=True, max_length=2000)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='MessageState',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('read', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='MessageThread',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('content', models.TextField(blank=True, max_length=2000)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('attachments',
                 models.ManyToManyField(to='dashboard.Attachment')),
            ],
        ),
    ]
Ejemplo n.º 18
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Camera',
            fields=[
                ('camera_no',
                 models.IntegerField(primary_key=True, serialize=False)),
                ('camera_name',
                 models.CharField(blank=True, max_length=100, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('customer_no',
                 models.IntegerField(primary_key=True, serialize=False)),
                ('customer_name', models.CharField(max_length=100)),
                ('customer_gender',
                 models.CharField(blank=True,
                                  choices=[('Male', 'Male'),
                                           ('Female', 'Female')],
                                  max_length=10,
                                  null=True)),
                ('customer_age',
                 models.IntegerField(
                     blank=True,
                     null=True,
                     validators=[
                         django.core.validators.MaxValueValidator(100),
                         django.core.validators.MinValueValidator(1)
                     ])),
                ('customer_market_in', models.BooleanField(default=False)),
                ('customer_ratings',
                 djongo.models.fields.EmbeddedModelField(
                     model_container=dashboard.models.ratings, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('product_no',
                 models.IntegerField(primary_key=True, serialize=False)),
                ('product_class',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('product_name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Realtime',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('realtime_product', models.CharField(max_length=128)),
                ('realtime_category', models.CharField(max_length=128)),
                ('realtime_site', models.CharField(max_length=128)),
                ('realtime_ranking', models.IntegerField(default=10)),
                ('realtime_date',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('realtime_value', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='CameraLog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('datetime_now', models.DateTimeField(auto_now=True)),
                ('camera',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='dashboard.Camera')),
                ('customer',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='dashboard.Customer')),
            ],
        ),
        migrations.AddField(
            model_name='camera',
            name='product',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='dashboard.Product'),
        ),
    ]
Ejemplo n.º 19
0
class Migration(migrations.Migration):

    initial = True

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

    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')),
                ('email',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='email address')),
                ('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')),
                ('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')),
                ('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', dashboard.models.CustomUserManager()),
            ],
        ),
    ]