class Migration(migrations.Migration):

    dependencies = [
        ('PageDisplay', '0004_page_last_edited'),
    ]

    operations = [
        migrations.CreateModel(
            name='ExternalURLModule',
            fields=[
                ('basemodule_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='PageDisplay.BaseModule')),
                ('url',
                 models.CharField(
                     max_length=128,
                     validators=[django.core.validators.URLValidator])),
                ('guide_text',
                 models.CharField(default='View online', max_length=128)),
            ],
            bases=(PageDisplay.models.BasicModuleMixin,
                   'PageDisplay.basemodule'),
        ),
    ]
Exemplo n.º 2
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='DownloadFileModule',
            fields=[
                ('basemodule_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='PageDisplay.BaseModule')),
                ('file', models.FileField(blank=True, null=True,
                                          upload_to='')),
                ('description', models.CharField(max_length=512)),
            ],
            bases=(PageDisplay.models.BasicModuleMixin,
                   'PageDisplay.basemodule'),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('PageDisplay', '0001_initial'),
        ('questionaire_mailing', '0002_auto_20200419_1404'),
    ]

    operations = [
        migrations.CreateModel(
            name='InquirerCodeModule',
            fields=[
                ('basemodule_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='PageDisplay.BaseModule')),
            ],
            bases=(PageDisplay.models.BasicModuleMixin,
                   'PageDisplay.basemodule'),
        ),
        migrations.AlterField(
            model_name='mailtask',
            name='active',
            field=models.BooleanField(default=False,
                                      verbose_name='Tigger is active'),
        ),
        migrations.AlterField(
            model_name='triggeredmailtask',
            name='event',
            field=models.CharField(choices=[('MR', 'After mail registration'),
                                            ('IC', 'After inquiry completion')
                                            ],
                                   max_length=3),
        ),
    ]
Exemplo n.º 4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('local_data_storage', '0001_initial'),
        ('PageDisplay', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='AnswerOption',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('answer', models.CharField(max_length=64)),
                ('context_code',
                 models.CharField(blank=True, max_length=256, null=True)),
                ('value', models.IntegerField()),
                ('image', models.ImageField(blank=True,
                                            null=True,
                                            upload_to='')),
            ],
        ),
        migrations.CreateModel(
            name='AnswerScoring',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('score_change_value',
                 models.DecimalField(decimal_places=2, max_digits=5)),
                ('take_answer_value', models.BooleanField(default=False)),
                ('answer_option',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Questionaire.AnswerOption')),
            ],
        ),
        migrations.CreateModel(
            name='Inquiry',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('is_complete', models.BooleanField(default=False)),
                ('completed_on', models.DateTimeField(blank=True, null=True)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('last_visited', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Page',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('position', models.PositiveIntegerField(unique=True)),
                ('auto_process', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.SlugField(max_length=25, unique=True)),
                ('description', models.CharField(max_length=256)),
                ('question_text', models.CharField(max_length=128)),
                ('help_text',
                 models.CharField(blank=True,
                                  default='',
                                  max_length=255,
                                  null=True)),
                ('question_type',
                 models.PositiveIntegerField(
                     choices=[(0, 'Open question'), (
                         1, 'Integer question'), (
                             2, 'Double question'), (3, 'Choice question')])),
                ('options',
                 models.TextField(blank=True, default='{}', null=True)),
            ],
        ),
        migrations.CreateModel(
            name='ScoringDeclaration',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.SlugField(max_length=32)),
                ('display_name',
                 models.CharField(blank=True, max_length=64, null=True)),
                ('description', models.CharField(max_length=256)),
                ('score_start_value',
                 models.DecimalField(decimal_places=2,
                                     default=0.5,
                                     max_digits=5)),
            ],
        ),
        migrations.CreateModel(
            name='Technology',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50, unique=True)),
                ('slug', models.SlugField()),
                ('short_text', models.CharField(max_length=256)),
                ('icon', models.ImageField(blank=True, null=True,
                                           upload_to='')),
                ('information_page',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   to='PageDisplay.Page')),
            ],
        ),
        migrations.CreateModel(
            name='TechScoreModule',
            fields=[
                ('basemodule_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='PageDisplay.BaseModule')),
                ('technology',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Questionaire.Technology')),
            ],
            bases=(PageDisplay.models.BasicModuleMixin,
                   'PageDisplay.basemodule'),
        ),
        migrations.CreateModel(
            name='TechScoreLink',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('score_threshold_approve',
                 models.DecimalField(decimal_places=2, default=1,
                                     max_digits=5)),
                ('score_threshold_deny',
                 models.DecimalField(decimal_places=2, default=0,
                                     max_digits=5)),
                ('score_declaration',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='Questionaire.ScoringDeclaration')),
                ('technology',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='Questionaire.Technology')),
            ],
        ),
        migrations.AddField(
            model_name='technology',
            name='score_declarations',
            field=models.ManyToManyField(through='Questionaire.TechScoreLink',
                                         to='Questionaire.ScoringDeclaration'),
        ),
        migrations.CreateModel(
            name='Score',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('score', models.DecimalField(decimal_places=2, max_digits=7)),
                ('declaration',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Questionaire.ScoringDeclaration')),
                ('inquiry',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Questionaire.Inquiry')),
            ],
        ),
        migrations.CreateModel(
            name='PageRequirement',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('threshold',
                 models.DecimalField(decimal_places=2, max_digits=5)),
                ('comparison',
                 models.PositiveIntegerField(choices=[(
                     0, 'Higher'), (1, 'Higher or equal'), (
                         2, 'Equal'), (3, 'Lower or Equal'), (4, 'Lower')])),
                ('page',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Questionaire.Page')),
                ('score_declaration',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Questionaire.ScoringDeclaration')),
            ],
        ),
        migrations.CreateModel(
            name='PageEntry',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('position', models.PositiveIntegerField(default=999)),
                ('entry_type',
                 models.PositiveIntegerField(blank=True,
                                             choices=[(1,
                                                       'General information'),
                                                      (2, 'Question')])),
                ('page',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Questionaire.Page')),
            ],
        ),
        migrations.CreateModel(
            name='PageEntryText',
            fields=[
                ('pageentry_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='Questionaire.PageEntry')),
                ('text', models.TextField(default='')),
            ],
            bases=('Questionaire.pageentry', ),
        ),
        migrations.AddField(
            model_name='page',
            name='exclude_on',
            field=models.ManyToManyField(blank=True,
                                         related_name='exclude_questions',
                                         to='Questionaire.Question'),
        ),
        migrations.AddField(
            model_name='page',
            name='include_on',
            field=models.ManyToManyField(blank=True,
                                         related_name='include_questions',
                                         to='Questionaire.Question'),
        ),
        migrations.CreateModel(
            name='InquiryQuestionAnswer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('answer',
                 models.CharField(blank=True, max_length=256, null=True)),
                ('processed', models.BooleanField(default=False)),
                ('inquiry',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Questionaire.Inquiry')),
                ('processed_answer',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='Questionaire.AnswerOption')),
                ('question',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Questionaire.Question')),
            ],
        ),
        migrations.AddField(
            model_name='inquiry',
            name='current_page',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='Questionaire.Page'),
        ),
        migrations.CreateModel(
            name='Inquirer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('email',
                 models.EmailField(blank=True, max_length=254, null=True)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('active_inquiry',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='Questionaire.Inquiry')),
            ],
        ),
        migrations.CreateModel(
            name='ExternalQuestionSource',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('code_source', models.CharField(max_length=256)),
                ('local_attribute',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='local_data_storage.DataColumn')),
                ('local_table',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='local_data_storage.DataTable')),
                ('question',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to='Questionaire.Question')),
            ],
        ),
        migrations.CreateModel(
            name='AnswerScoringNote',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('text',
                 models.TextField(blank=True,
                                  default='Nothing defined',
                                  null=True)),
                ('exclude_on',
                 models.ManyToManyField(blank=True,
                                        related_name='Answer_excludes',
                                        to='Questionaire.AnswerOption')),
                ('include_on',
                 models.ManyToManyField(blank=True,
                                        related_name='Answer_includes',
                                        to='Questionaire.AnswerOption')),
                ('scoring',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Questionaire.AnswerScoring')),
                ('technology',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='Questionaire.Technology')),
            ],
        ),
        migrations.AddField(
            model_name='answerscoring',
            name='declaration',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='Questionaire.ScoringDeclaration'),
        ),
        migrations.AddField(
            model_name='answeroption',
            name='question',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='Questionaire.Question'),
        ),
        migrations.CreateModel(
            name='TechGroup',
            fields=[
                ('technology_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='Questionaire.Technology')),
                ('sub_technologies',
                 models.ManyToManyField(blank=True,
                                        related_name='techgroups',
                                        to='Questionaire.Technology')),
            ],
            bases=('Questionaire.technology', ),
        ),
        migrations.CreateModel(
            name='PageEntryQuestion',
            fields=[
                ('pageentry_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='Questionaire.PageEntry')),
                ('required', models.BooleanField(default=False)),
                ('question',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Questionaire.Question')),
            ],
            bases=('Questionaire.pageentry', ),
        ),
        migrations.AddField(
            model_name='page',
            name='questions',
            field=models.ManyToManyField(
                through='Questionaire.PageEntryQuestion',
                to='Questionaire.Question'),
        ),
    ]
Exemplo n.º 5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='BaseModule',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('_type', models.PositiveIntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='ImageModule',
            fields=[
                ('basemodule_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='PageDisplay.BaseModule')),
                ('image', models.ImageField(upload_to='')),
                ('caption',
                 models.CharField(blank=True,
                                  default='',
                                  max_length=256,
                                  null=True)),
                ('height', models.PositiveIntegerField(default=100)),
                ('mode',
                 models.SlugField(choices=[('auto', 'Display full image'),
                                           ('full', 'Cover image')],
                                  default='auto')),
                ('css',
                 models.CharField(
                     blank=True,
                     default='',
                     help_text='CSS classes in accordance with Bootstrap',
                     max_length=256,
                     null=True)),
            ],
            bases=(PageDisplay.models.BasicModuleMixin,
                   'PageDisplay.basemodule'),
        ),
        migrations.CreateModel(
            name='TextModule',
            fields=[
                ('basemodule_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='PageDisplay.BaseModule')),
                ('text', models.TextField()),
                ('css',
                 models.CharField(
                     blank=True,
                     default='',
                     help_text='CSS classes in accordance with Bootstrap',
                     max_length=256,
                     null=True)),
            ],
            bases=(PageDisplay.models.BasicModuleMixin,
                   'PageDisplay.basemodule'),
        ),
        migrations.CreateModel(
            name='TitleModule',
            fields=[
                ('basemodule_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='PageDisplay.BaseModule')),
                ('title', models.CharField(max_length=127)),
                ('size',
                 models.PositiveIntegerField(
                     default=1,
                     help_text='The level of the title 1,2,3... maz 5')),
                ('css',
                 models.CharField(
                     blank=True,
                     default='',
                     help_text='CSS classes in accordance with Bootstrap',
                     max_length=256,
                     null=True)),
            ],
            bases=(PageDisplay.models.BasicModuleMixin,
                   'PageDisplay.basemodule'),
        ),
        migrations.CreateModel(
            name='WhiteSpaceModule',
            fields=[
                ('basemodule_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='PageDisplay.BaseModule')),
                ('height',
                 models.PositiveIntegerField(
                     default=100,
                     validators=[
                         django.core.validators.MinValueValidator(
                             limit_value=25),
                         django.core.validators.MaxValueValidator(
                             limit_value=1000)
                     ])),
            ],
            bases=(PageDisplay.models.BasicModuleMixin,
                   'PageDisplay.basemodule'),
        ),
        migrations.CreateModel(
            name='Page',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=63)),
                ('root_module',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='PageDisplay.BaseModule')),
            ],
        ),
        migrations.CreateModel(
            name='ContainerModulePositionalLink',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('position', models.PositiveIntegerField(default=999)),
                ('module',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='container_link',
                                   to='PageDisplay.BaseModule')),
            ],
            options={
                'ordering': ['-position'],
            },
        ),
        migrations.CreateModel(
            name='OrderedContainerModule',
            fields=[
                ('basemodule_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='PageDisplay.BaseModule')),
                ('module_list',
                 models.ManyToManyField(
                     related_name='container',
                     through='PageDisplay.ContainerModulePositionalLink',
                     to='PageDisplay.BaseModule')),
            ],
            bases=(PageDisplay.models.ContainerModuleMixin,
                   'PageDisplay.basemodule'),
        ),
        migrations.CreateModel(
            name='VerticalContainerModule',
            fields=[
                ('orderedcontainermodule_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='PageDisplay.OrderedContainerModule')),
            ],
            bases=('PageDisplay.orderedcontainermodule', ),
        ),
        migrations.AddField(
            model_name='containermodulepositionallink',
            name='container',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                related_name='module_link',
                to='PageDisplay.OrderedContainerModule'),
        ),
    ]