Example #1
0
class Migration(migrations.Migration):

    dependencies = [
        ('catalogue', '0009_auto_20190209_1811'),
    ]

    operations = [
        migrations.AlterField(
            model_name='media',
            name='file',
            field=models.FileField(
                upload_to=catalogue.models.name_media_file,
                validators=[
                    django.core.validators.FileExtensionValidator(
                        ('jpeg', 'jpg', 'png', 'gif', 'mp3', 'mp4', 'mpeg'))
                ]),
        ),
    ]
Example #2
0
class Migration(migrations.Migration):

    dependencies = [
        ('catalogue', '0024_record_source_legend'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='style',
            name='checksum',
        ),
        migrations.AlterField(
            model_name='style',
            name='content',
            field=models.FileField(storage=catalogue.models.StyleStorage(),
                                   upload_to=catalogue.models.styleFilePath),
        ),
    ]
Example #3
0
class Migration(migrations.Migration):

    dependencies = [
        ('catalogue', '0013_auto_20190210_2030'),
    ]

    operations = [
        migrations.AlterField(
            model_name='media',
            name='file',
            field=models.FileField(
                upload_to=catalogue.models.name_media_file,
                validators=[
                    django.core.validators.FileExtensionValidator(
                        ('jpeg', 'jpg', 'png', 'gif', 'mp3', 'pcm', 'wav',
                         'flac', 'wma', 'mp4', 'mpeg', 'avi', 'flv', 'wmv',
                         'mov', 'mkv'))
                ]),
        ),
    ]
Example #4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Application',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(
                     max_length=255,
                     unique=True,
                     validators=[
                         django.core.validators.RegexValidator(
                             re.compile('^[a-z0-9_]+$', 32),
                             'Slug can only contain lowercase letters, numbers and underscores',
                             'invalid')
                     ])),
                ('description', models.TextField(blank=True)),
                ('last_modify_time', models.DateTimeField(auto_now=True)),
                ('create_time', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='ApplicationLayer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('order', models.PositiveIntegerField()),
                ('application',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='catalogue.Application')),
            ],
            options={
                'ordering': ['application', 'order', 'layer'],
            },
        ),
        migrations.CreateModel(
            name='Collaborator',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('position', models.CharField(max_length=255)),
                ('email', models.EmailField(max_length=254)),
                ('url', models.URLField(blank=True)),
                ('phone', models.CharField(blank=True, max_length=50)),
                ('fax', models.CharField(blank=True, max_length=50)),
                ('hours_of_service', models.CharField(blank=True,
                                                      max_length=50)),
                ('contact_instructions',
                 models.CharField(blank=True, max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='Organization',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('short_name', models.CharField(max_length=30)),
                ('url', models.URLField()),
                ('address', models.CharField(blank=True, max_length=255)),
                ('city', models.CharField(blank=True, max_length=50)),
                ('state_or_province',
                 models.CharField(blank=True, max_length=50)),
                ('postal_code', models.CharField(blank=True, max_length=30)),
                ('country', models.CharField(blank=True, max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='PycswConfig',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('language', models.CharField(default='en-US', max_length=10)),
                ('max_records', models.IntegerField(default=10)),
                ('transactions',
                 models.BooleanField(default=False,
                                     help_text='Enable transactions')),
                ('allowed_ips',
                 models.CharField(
                     blank=True,
                     default='127.0.0.1',
                     help_text=
                     'IP addresses that are allowed to make transaction requests',
                     max_length=255)),
                ('harvest_page_size', models.IntegerField(default=10)),
                ('title', models.CharField(max_length=50)),
                ('abstract', models.TextField()),
                ('keywords', models.CharField(max_length=255)),
                ('keywords_type', models.CharField(max_length=255)),
                ('fees', models.CharField(max_length=100)),
                ('access_constraints', models.CharField(max_length=255)),
                ('repository_filter',
                 models.CharField(blank=True, max_length=255)),
                ('inspire_enabled', models.BooleanField(default=False)),
                ('inspire_languages',
                 models.CharField(blank=True, max_length=255)),
                ('inspire_default_language',
                 models.CharField(blank=True, max_length=30)),
                ('inspire_date', models.DateTimeField(blank=True, null=True)),
                ('gemet_keywords', models.CharField(blank=True,
                                                    max_length=255)),
                ('conformity_service',
                 models.CharField(blank=True, max_length=255)),
                ('temporal_extent_start',
                 models.DateTimeField(blank=True, null=True)),
                ('temporal_extent_end',
                 models.DateTimeField(blank=True, null=True)),
                ('service_type_version',
                 models.CharField(blank=True, max_length=10)),
                ('point_of_contact',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='catalogue.Collaborator')),
            ],
            options={
                'verbose_name': 'PyCSW Configuration',
                'verbose_name_plural': 'PyCSW Configuration',
            },
        ),
        migrations.CreateModel(
            name='Record',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('identifier',
                 models.CharField(db_index=True,
                                  help_text='Maps to pycsw:Identifier',
                                  max_length=255)),
                ('title',
                 models.CharField(blank=True,
                                  help_text='Maps to pycsw:Title',
                                  max_length=255,
                                  null=True)),
                ('typename',
                 models.CharField(blank=True,
                                  db_index=True,
                                  default='',
                                  editable=False,
                                  help_text='Maps to pycsw:Typename',
                                  max_length=100)),
                ('schema',
                 models.CharField(blank=True,
                                  db_index=True,
                                  default='',
                                  editable=False,
                                  help_text='Maps to pycsw:Schema',
                                  max_length=100)),
                ('insert_date',
                 models.DateTimeField(auto_now_add=True,
                                      help_text='Maps to pycsw:InsertDate')),
                ('xml',
                 models.TextField(default='',
                                  editable=False,
                                  help_text=' Maps to pycsw:XML')),
                ('any_text',
                 models.TextField(blank=True,
                                  help_text='Maps to pycsw:AnyText',
                                  null=True)),
                ('modified',
                 models.DateTimeField(blank=True,
                                      help_text='Maps to pycsw:Modified',
                                      null=True)),
                ('bounding_box',
                 models.TextField(
                     blank=True,
                     help_text="Maps to pycsw:BoundingBox.It's a WKT geometry",
                     null=True)),
                ('abstract',
                 models.TextField(blank=True,
                                  help_text='Maps to pycsw:Abstract',
                                  null=True)),
                ('keywords',
                 models.CharField(blank=True,
                                  help_text='Maps to pycsw:Keywords',
                                  max_length=255,
                                  null=True)),
                ('publication_date',
                 models.DateTimeField(
                     blank=True,
                     help_text='Maps to pycsw:PublicationDate',
                     null=True)),
                ('service_type',
                 models.CharField(blank=True,
                                  help_text='Maps to pycsw:ServiceType',
                                  max_length=30,
                                  null=True)),
                ('service_type_version',
                 models.CharField(blank=True,
                                  editable=False,
                                  help_text='Maps to pycsw:ServiceTypeVersion',
                                  max_length=30,
                                  null=True)),
                ('links',
                 models.TextField(blank=True,
                                  editable=False,
                                  help_text='Maps to pycsw:Links',
                                  null=True)),
                ('crs',
                 models.CharField(blank=True,
                                  help_text='Maps to pycsw:CRS',
                                  max_length=255,
                                  null=True)),
                ('active', models.BooleanField(default=True, editable=False)),
                ('legend',
                 models.FileField(blank=True,
                                  null=True,
                                  upload_to='catalogue/legends')),
                ('source_legend',
                 models.FileField(blank=True,
                                  editable=False,
                                  null=True,
                                  upload_to='catalogue/legends/source')),
            ],
            options={
                'ordering': ['identifier'],
            },
        ),
        migrations.CreateModel(
            name='Style',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('format',
                 models.CharField(choices=[('SLD', 'SLD'), ('QML', 'QML'),
                                           ('LYR', 'LAYER')],
                                  max_length=3)),
                ('default', models.BooleanField(default=False)),
                ('content',
                 models.FileField(storage=catalogue.models.OverwriteStorage(),
                                  upload_to=catalogue.models.styleFilePath)),
                ('record',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='styles',
                                   to='catalogue.Record')),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.SlugField(max_length=255, unique=True)),
                ('description', models.TextField()),
            ],
        ),
        migrations.AddField(
            model_name='record',
            name='tags',
            field=models.ManyToManyField(blank=True, to='catalogue.Tag'),
        ),
        migrations.AddField(
            model_name='collaborator',
            name='organization',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='collaborators',
                to='catalogue.Organization'),
        ),
        migrations.AddField(
            model_name='applicationlayer',
            name='layer',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='catalogue.Record'),
        ),
        migrations.AddField(
            model_name='application',
            name='records',
            field=models.ManyToManyField(to='catalogue.Record'),
        ),
        migrations.AlterUniqueTogether(
            name='applicationlayer',
            unique_together=set([('application', 'layer')]),
        ),
    ]
Example #5
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.AlterField(
            model_name='applicationlayer',
            name='application',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                to='catalogue.Application'),
        ),
        migrations.AlterField(
            model_name='applicationlayer',
            name='layer',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                to='catalogue.Record'),
        ),
        migrations.AlterField(
            model_name='collaborator',
            name='organization',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                related_name='collaborators',
                to='catalogue.Organization'),
        ),
        migrations.AlterField(
            model_name='pycswconfig',
            name='point_of_contact',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                to='catalogue.Collaborator'),
        ),
        migrations.AlterField(
            model_name='record',
            name='legend',
            field=models.FileField(blank=True,
                                   null=True,
                                   storage=catalogue.models.OverwriteStorage(),
                                   upload_to=catalogue.models.legendFilePath),
        ),
        migrations.AlterField(
            model_name='record',
            name='modified',
            field=models.DateTimeField(auto_now=True,
                                       default=django.utils.timezone.now,
                                       help_text='Maps to pycsw:Modified'),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='record',
            name='source_legend',
            field=models.FileField(
                blank=True,
                editable=False,
                null=True,
                storage=catalogue.models.OverwriteStorage(),
                upload_to=catalogue.models.sourceLegendFilePath),
        ),
        migrations.AlterField(
            model_name='style',
            name='record',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                related_name='styles',
                to='catalogue.Record'),
        ),
    ]