예제 #1
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Member',
            fields=[
                ('guid',
                 models.CharField(default=uuid.uuid4,
                                  max_length=255,
                                  primary_key=True,
                                  serialize=False)),
                ('student_id', models.CharField(max_length=9)),
                ('avatar', models.URLField(blank=True)),
                ('year',
                 models.CharField(blank=True,
                                  choices=[(73, 73), (74, 74), (75, 75),
                                           (76, 76), (77, 77), (78, 78),
                                           (79, 79), (80, 80), (81, 81),
                                           (82, 82), (83, 83), (84, 84),
                                           (85, 85), (86, 86), (87, 87),
                                           (88, 88), (89, 89), (90, 90),
                                           (91, 91), (92, 92), (93, 93),
                                           (94, 94), (95, 95), (96, 96),
                                           (97, 97), (98, 98), (99, 99),
                                           (100, 100), (101, 101), (102, 102),
                                           (103, 103), (104, 104), (105, 105),
                                           (106, 106), (107, 107), (108, 108),
                                           (109, 109)],
                                  default=109,
                                  max_length=3)),
                ('name', models.CharField(max_length=31)),
                ('foreign_name',
                 models.CharField(blank=True, max_length=31, null=True)),
                ('hobby', models.CharField(max_length=127)),
                ('expertise', models.CharField(max_length=127)),
                ('constellation', models.CharField(max_length=31)),
                ('link', models.URLField(blank=True)),
                ('email', models.EmailField(blank=True, max_length=254)),
                ('education',
                 models.CharField(choices=[('Master', 'Master'),
                                           ('Ph.D.', 'Ph.D.'),
                                           ('EMBA', 'EMBA'), ('EDBA', 'EDBA'),
                                           ('Professor', 'Professor')],
                                  default='Master',
                                  max_length=15)),
                ('is_graduated',
                 models.BooleanField(choices=[(True, True), (False, False)],
                                     default=False)),
            ],
            bases=(common.models.BaseSheet, models.Model),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('common', '0004_auto_20191231_1517'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='image',
            options={'verbose_name': 'Property Image'},
        ),
        migrations.AlterField(
            model_name='address',
            name='country',
            field=django_countries.fields.CountryField(countries=common.models.EUCountries, default='NL', help_text='Countries in EU Union', max_length=2),
        ),
        migrations.AlterField(
            model_name='image',
            name='alt',
            field=models.CharField(max_length=20, verbose_name='alt'),
        ),
        migrations.AlterField(
            model_name='image',
            name='url',
            field=models.URLField(verbose_name='url'),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='CatImage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 common.models.CreationDateTimeField(auto_now_add=True,
                                                     verbose_name='생성일시')),
                ('modified',
                 common.models.ModificationDateTimeField(auto_now=True,
                                                         verbose_name='수정일시')),
                ('url', models.URLField(verbose_name='이미지 URL')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Tip',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 common.models.CreationDateTimeField(auto_now_add=True,
                                                     verbose_name='생성일시')),
                ('modified',
                 common.models.ModificationDateTimeField(auto_now=True,
                                                         verbose_name='수정일시')),
                ('content', models.TextField(verbose_name='내용')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
예제 #4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Activity',
            fields=[
                ('guid', models.CharField(default=uuid.uuid4, max_length=36, primary_key=True, serialize=False)),
                ('activity', models.CharField(max_length=50)),
                ('url', models.URLField()),
                ('name', models.CharField(max_length=50)),
                ('date', models.DateField()),
                ('location', models.CharField(blank=True, max_length=50)),
            ],
            bases=(common.models.BaseSheet, models.Model),
        ),
    ]
예제 #5
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username', models.CharField(max_length=100, unique=True)),
                ('first_name', models.CharField(blank=True, max_length=150)),
                ('last_name', models.CharField(blank=True, max_length=150)),
                ('email', models.EmailField(max_length=255, unique=True)),
                ('is_active', models.BooleanField(default=True)),
                ('is_admin', models.BooleanField(default=False)),
                ('is_staff', models.BooleanField(default=False)),
                ('date_joined',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='date joined')),
                ('role',
                 models.CharField(choices=[('ADMIN', 'ADMIN'),
                                           ('USER', 'USER'),
                                           ('SALES', 'SALES'),
                                           ('MANAGER', 'MANAGER'),
                                           ('SALES MANAGER', 'SALES MANAGER')],
                                  max_length=50)),
                ('profile_pic',
                 models.FileField(blank=True,
                                  max_length=1000,
                                  null=True,
                                  upload_to=common.models.img_url)),
                ('has_sales_access', models.BooleanField(default=False)),
                ('has_marketing_access', models.BooleanField(default=False)),
            ],
            options={
                'ordering': ['-is_active'],
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('address_line',
                 models.CharField(blank=True,
                                  max_length=255,
                                  null=True,
                                  verbose_name='Address')),
                ('street',
                 models.CharField(blank=True,
                                  max_length=55,
                                  null=True,
                                  verbose_name='Street')),
                ('city',
                 models.CharField(blank=True,
                                  max_length=255,
                                  null=True,
                                  verbose_name='City')),
                ('state',
                 models.CharField(blank=True,
                                  max_length=255,
                                  null=True,
                                  verbose_name='State')),
                ('postcode',
                 models.CharField(blank=True,
                                  max_length=64,
                                  null=True,
                                  verbose_name='Post/Zip-code')),
                ('country',
                 models.CharField(
                     blank=True,
                     choices=[('GB', 'United Kingdom'), ('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'),
                              ('BA', 'Bosnia and Herzegovina'),
                              ('BW', 'Botswana'), ('BV', 'Bouvet Island'),
                              ('BR', 'Brazil'),
                              ('IO', 'British Indian Ocean Territory'),
                              ('BN', 'Brunei Darussalam'), ('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 (Keeling) Islands'),
                              ('CO', 'Colombia'), ('KM', 'Comoros'),
                              ('CG', 'Congo'),
                              ('CD', 'Congo, The Democratic Republic of the'),
                              ('CK', 'Cook Islands'), ('CR', 'Costa Rica'),
                              ('CI', "Cote d'Ivoire"), ('HR', 'Croatia'),
                              ('CU', 'Cuba'), ('CY', 'Cyprus'),
                              ('CZ', 'Czech Republic'), ('DK', 'Denmark'),
                              ('DJ', 'Djibouti'), ('DM', 'Dominica'),
                              ('DO', 'Dominican Republic'), ('EC', 'Ecuador'),
                              ('EG', 'Egypt'), ('SV', 'El Salvador'),
                              ('GQ', 'Equatorial Guinea'), ('ER', 'Eritrea'),
                              ('EE', 'Estonia'), ('ET', 'Ethiopia'),
                              ('FK', 'Falkland Islands (Malvinas)'),
                              ('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'),
                              ('VA', 'Holy See (Vatican City State)'),
                              ('HN', 'Honduras'), ('HK', 'Hong Kong'),
                              ('HU', 'Hungary'), ('IS', 'Iceland'),
                              ('IN', 'India'), ('ID', 'Indonesia'),
                              ('IR', 'Iran, Islamic Republic of'),
                              ('IQ', 'Iraq'), ('IE', 'Ireland'),
                              ('IM', 'Isle of Man'), ('IL', 'Israel'),
                              ('IT', 'Italy'), ('JM', 'Jamaica'),
                              ('JP', 'Japan'), ('JE', 'Jersey'),
                              ('JO', 'Jordan'), ('KZ', 'Kazakhstan'),
                              ('KE', 'Kenya'), ('KI', 'Kiribati'),
                              ('KP', "Korea, Democratic People's Republic of"),
                              ('KR', 'Korea, Republic of'), ('KW', 'Kuwait'),
                              ('KG', 'Kyrgyzstan'),
                              ('LA', "Lao People's Democratic Republic"),
                              ('LV', 'Latvia'), ('LB', 'Lebanon'),
                              ('LS', 'Lesotho'), ('LR', 'Liberia'),
                              ('LY', 'Libyan Arab Jamahiriya'),
                              ('LI', 'Liechtenstein'), ('LT', 'Lithuania'),
                              ('LU', 'Luxembourg'), ('MO', 'Macao'),
                              ('MK',
                               'Macedonia, The Former Yugoslav Republic of'),
                              ('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, Federated States of'),
                              ('MD', 'Moldova'), ('MC', 'Monaco'),
                              ('MN', 'Mongolia'), ('ME', 'Montenegro'),
                              ('MS', 'Montserrat'), ('MA', 'Morocco'),
                              ('MZ', 'Mozambique'), ('MM', 'Myanmar'),
                              ('NA', 'Namibia'), ('NR', 'Nauru'),
                              ('NP', 'Nepal'), ('NL', 'Netherlands'),
                              ('AN', 'Netherlands Antilles'),
                              ('NC', 'New Caledonia'), ('NZ', 'New Zealand'),
                              ('NI', 'Nicaragua'), ('NE', 'Niger'),
                              ('NG', 'Nigeria'), ('NU', 'Niue'),
                              ('NF', 'Norfolk Island'),
                              ('MP', 'Northern Mariana Islands'),
                              ('NO', 'Norway'), ('OM', 'Oman'),
                              ('PK', 'Pakistan'), ('PW', 'Palau'),
                              ('PS', 'Palestinian Territory, Occupied'),
                              ('PA', 'Panama'), ('PG', 'Papua New Guinea'),
                              ('PY', 'Paraguay'), ('PE', 'Peru'),
                              ('PH', 'Philippines'), ('PN', 'Pitcairn'),
                              ('PL', 'Poland'), ('PT', 'Portugal'),
                              ('PR', 'Puerto Rico'), ('QA', 'Qatar'),
                              ('RE', 'Reunion'), ('RO', 'Romania'),
                              ('RU', 'Russian Federation'), ('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'),
                              ('SK', 'Slovakia'), ('SI', 'Slovenia'),
                              ('SB', 'Solomon Islands'), ('SO', 'Somalia'),
                              ('ZA', 'South Africa'),
                              ('GS',
                               'South Georgia and the South Sandwich Islands'),
                              ('ES', 'Spain'), ('LK', 'Sri Lanka'),
                              ('SD', 'Sudan'), ('SR', 'Suriname'),
                              ('SJ', 'Svalbard and Jan Mayen'),
                              ('SZ', 'Swaziland'), ('SE', 'Sweden'),
                              ('CH', 'Switzerland'),
                              ('SY', 'Syrian Arab Republic'),
                              ('TW', 'Taiwan, Province of China'),
                              ('TJ', 'Tajikistan'),
                              ('TZ', 'Tanzania, United Republic of'),
                              ('TH', 'Thailand'), ('TL', 'Timor-Leste'),
                              ('TG', 'Togo'), ('TK', 'Tokelau'),
                              ('TO', 'Tonga'), ('TT', 'Trinidad and Tobago'),
                              ('TN', 'Tunisia'), ('TR', 'Turkey'),
                              ('TM', 'Turkmenistan'),
                              ('TC', 'Turks and Caicos Islands'),
                              ('TV', 'Tuvalu'), ('UG', 'Uganda'),
                              ('UA', 'Ukraine'), ('AE',
                                                  'United Arab Emirates'),
                              ('US', 'United States'),
                              ('UM', 'United States Minor Outlying Islands'),
                              ('UY', 'Uruguay'), ('UZ', 'Uzbekistan'),
                              ('VU', 'Vanuatu'), ('VE', 'Venezuela'),
                              ('VN', 'Viet Nam'),
                              ('VG', 'Virgin Islands, British'),
                              ('VI', 'Virgin Islands, U.S.'),
                              ('WF', 'Wallis and Futuna'),
                              ('EH', 'Western Sahara'), ('YE', 'Yemen'),
                              ('ZM', 'Zambia'), ('ZW', 'Zimbabwe')],
                     max_length=3,
                     null=True)),
            ],
        ),
        migrations.CreateModel(
            name='APISettings',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=1000)),
                ('apikey', models.CharField(blank=True, max_length=16)),
                ('website', models.URLField(default='', max_length=255)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ('-created_on', ),
            },
        ),
        migrations.CreateModel(
            name='Attachments',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('file_name', models.CharField(max_length=60)),
                ('created_on',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Created on')),
                ('attachment',
                 models.FileField(max_length=1001,
                                  upload_to='attachments/%Y/%m/')),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('comment', models.CharField(max_length=255)),
                ('commented_on', models.DateTimeField(auto_now_add=True)),
                ('account',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='accounts_comments',
                                   to='accounts.Account')),
                ('case',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='cases',
                                   to='cases.Case')),
                ('commented_by',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('activation_key', models.CharField(max_length=50)),
                ('key_expires', models.DateTimeField()),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Google',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('google_id', models.CharField(default='', max_length=200)),
                ('google_url', models.CharField(default='', max_length=1000)),
                ('verified_email', models.CharField(default='',
                                                    max_length=200)),
                ('family_name', models.CharField(default='', max_length=200)),
                ('name', models.CharField(default='', max_length=200)),
                ('gender', models.CharField(default='', max_length=10)),
                ('dob', models.CharField(default='', max_length=50)),
                ('given_name', models.CharField(default='', max_length=200)),
                ('email',
                 models.CharField(db_index=True, default='', max_length=200)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='google',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Document',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(blank=True, max_length=1000, null=True)),
                ('document_file',
                 models.FileField(max_length=5000,
                                  upload_to=common.models.document_path)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('status',
                 models.CharField(choices=[('active', 'active'),
                                           ('inactive', 'inactive')],
                                  default='active',
                                  max_length=64)),
                ('created_by',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='document_uploaded',
                     to=settings.AUTH_USER_MODEL)),
                ('shared_to',
                 models.ManyToManyField(related_name='document_shared_to',
                                        to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ('-created_on', ),
            },
        ),
        migrations.CreateModel(
            name='Comment_Files',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('updated_on', models.DateTimeField(auto_now_add=True)),
                ('comment_file',
                 models.FileField(default='',
                                  upload_to='comment_files',
                                  verbose_name='File')),
                ('comment',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='common.Comment')),
            ],
        ),
    ]
예제 #6
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_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')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  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)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('updated_on', models.DateTimeField(auto_now=True)),
                ('email', models.EmailField(max_length=254, unique=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={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='UserAction',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('updated_on', models.DateTimeField(auto_now=True)),
                ('url', models.URLField(max_length=2083)),
                ('method', models.CharField(max_length=64)),
                ('url_name', models.CharField(max_length=256, null=True)),
                ('status_code', models.IntegerField()),
                ('user_agent', models.TextField(null=True)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='user_actions',
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
예제 #7
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username', models.CharField(max_length=100, unique=True)),
                ('first_name', models.CharField(blank=True, max_length=150)),
                ('last_name', models.CharField(blank=True, max_length=150)),
                ('email', models.EmailField(max_length=255, unique=True)),
                ('is_active', models.BooleanField(default=True)),
                ('is_admin', models.BooleanField(default=False)),
                ('is_staff', models.BooleanField(default=False)),
                ('date_joined',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='date joined')),
                ('role',
                 models.CharField(choices=[('ADMIN', 'ADMIN'),
                                           ('CONSULTANT', 'CONSULTANT'),
                                           ('USER', 'USER')],
                                  max_length=50)),
                ('profile_pic',
                 models.FileField(blank=True,
                                  max_length=1000,
                                  null=True,
                                  upload_to=common.models.img_url)),
                ('has_sales_access', models.BooleanField(default=False)),
                ('has_marketing_access', models.BooleanField(default=False)),
            ],
            options={
                'ordering': ['-is_active'],
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('address_line',
                 models.CharField(blank=True,
                                  max_length=255,
                                  null=True,
                                  verbose_name='Address')),
                ('street',
                 models.CharField(blank=True,
                                  max_length=55,
                                  null=True,
                                  verbose_name='Street')),
                ('city',
                 models.CharField(blank=True,
                                  max_length=255,
                                  null=True,
                                  verbose_name='City')),
                ('state',
                 models.CharField(blank=True,
                                  max_length=255,
                                  null=True,
                                  verbose_name='State')),
                ('postcode',
                 models.CharField(blank=True,
                                  max_length=64,
                                  null=True,
                                  verbose_name='Post/Zip-code')),
                ('country',
                 models.CharField(blank=True,
                                  choices=[('Botswana', 'Botswana')],
                                  max_length=20,
                                  null=True)),
            ],
        ),
        migrations.CreateModel(
            name='APISettings',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=1000)),
                ('apikey', models.CharField(blank=True, max_length=16)),
                ('website', models.URLField(default='', max_length=255)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ('-created_on', ),
            },
        ),
        migrations.CreateModel(
            name='Attachments',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('file_name', models.CharField(max_length=60)),
                ('created_on',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Created on')),
                ('attachment',
                 models.FileField(max_length=1001,
                                  upload_to='attachments/%Y/%m/')),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('comment', models.CharField(max_length=255)),
                ('commented_on', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Comment_Files',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('updated_on', models.DateTimeField(auto_now_add=True)),
                ('comment_file',
                 models.FileField(default='',
                                  upload_to='comment_files',
                                  verbose_name='File')),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('activation_key', models.CharField(max_length=50)),
                ('key_expires', models.DateTimeField()),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Google',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('google_id', models.CharField(default='', max_length=200)),
                ('google_url', models.CharField(default='', max_length=1000)),
                ('verified_email', models.CharField(default='',
                                                    max_length=200)),
                ('family_name', models.CharField(default='', max_length=200)),
                ('name', models.CharField(default='', max_length=200)),
                ('gender', models.CharField(default='', max_length=10)),
                ('dob', models.CharField(default='', max_length=50)),
                ('given_name', models.CharField(default='', max_length=200)),
                ('email',
                 models.CharField(db_index=True, default='', max_length=200)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='google',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Document',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(blank=True, max_length=1000, null=True)),
                ('document_file',
                 models.FileField(max_length=5000,
                                  upload_to=common.models.document_path)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('status',
                 models.CharField(choices=[('active', 'active'),
                                           ('inactive', 'inactive')],
                                  default='active',
                                  max_length=64)),
                ('created_by',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='document_uploaded',
                     to=settings.AUTH_USER_MODEL)),
                ('shared_to',
                 models.ManyToManyField(related_name='document_shared_to',
                                        to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ('-created_on', ),
            },
        ),
    ]
예제 #8
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='College',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')),
                ('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')),
                ('name', models.CharField(max_length=200, unique=True, verbose_name='Název školy')),
                ('type', models.CharField(choices=[('univerzitni', 'univerzitní'), ('neuniverzitni', 'neuniverzitní')], max_length=20, verbose_name='Typ')),
                ('form', models.CharField(choices=[('soukroma', 'soukromá'), ('statni', 'státní'), ('verejna', 'veřejná')], max_length=20, verbose_name='Forma')),
                ('address', models.CharField(max_length=200, verbose_name='Adresa')),
                ('rid', models.CharField(max_length=20, unique=True, verbose_name='RID')),
                ('ic', models.CharField(max_length=20, verbose_name='IČ')),
                ('databox', models.CharField(max_length=20, verbose_name='Datová schránka')),
                ('url', models.URLField(verbose_name='URL')),
                ('code', models.CharField(max_length=30, unique=True, verbose_name='Zkratka')),
            ],
            options={
                'verbose_name': 'Vysoká škola',
                'verbose_name_plural': 'Vysoké školy',
                'ordering': ('name',),
            },
            bases=(models.Model, common.models.GraphModel),
        ),
        migrations.CreateModel(
            name='Faculty',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')),
                ('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')),
                ('name', models.CharField(max_length=200, verbose_name='Název fakulty')),
                ('rid', models.CharField(max_length=20, verbose_name='RID')),
                ('url', models.URLField(verbose_name='URL')),
                ('college', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='colleges.college')),
            ],
            options={
                'verbose_name': 'Fakulta vysoké školy',
                'verbose_name_plural': 'Fakulty vysokých škol',
                'ordering': ('name', 'college'),
                'unique_together': {('name', 'college')},
            },
            bases=(models.Model, common.models.GraphModel),
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')),
                ('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')),
                ('name', models.CharField(max_length=300, verbose_name='Název')),
                ('price', models.IntegerField(verbose_name='Cena')),
                ('sds', models.IntegerField(verbose_name='Standardní doba studia')),
                ('form_present', models.BooleanField(default=False, verbose_name='Prezenční forma studia')),
                ('form_combined', models.BooleanField(default=True, verbose_name='Kombinovaná forma studia')),
                ('url', models.URLField(verbose_name='URL na podrobnější informace')),
                ('note', models.TextField(blank=True, verbose_name='Poznámka')),
                ('faculty', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='colleges.faculty', verbose_name='Fakulta')),
                ('subjects', models.ManyToManyField(to='teaching.Subject', verbose_name='Předměty')),
            ],
            options={
                'verbose_name': 'Kurz',
                'verbose_name_plural': 'Kurzy',
                'ordering': ('name', 'faculty', 'faculty__college'),
            },
        ),
    ]