diff --git a/conf/settings.py b/conf/settings.py index 7a4a7fc8..740f5592 100644 --- a/conf/settings.py +++ b/conf/settings.py @@ -85,9 +85,9 @@ 'storages', 'rest_framework', 'wagtailmedia', - 'export_readiness.apps.GreatDomesticConfig', 'great_international.apps.GreatInternationalConfig', 'components.apps.ComponentsConfig', + 'export_readiness.apps.GreatDomesticConfig', 'django_filters', 'authbroker_client', 'django_celery_beat', diff --git a/export_readiness/migrations/0082_remove_country_region_remove_industrytag_icon_and_more.py b/export_readiness/migrations/0082_remove_country_region_remove_industrytag_icon_and_more.py new file mode 100644 index 00000000..00753c70 --- /dev/null +++ b/export_readiness/migrations/0082_remove_country_region_remove_industrytag_icon_and_more.py @@ -0,0 +1,38 @@ +# Generated by Django 4.1.9 on 2023-06-14 22:30 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('great_international', '0160_auto_20230505_1933'), + ('export_readiness', '0081_auto_20211124_1053'), + ('core', '0032_auto_20230614_0954'), + ('great_international', '0161_alter_internationalarticlelistingpage_tags_and_more'), + + + ] + + operations = [ + migrations.RemoveField( + model_name='country', + name='region', + ), + migrations.RemoveField( + model_name='industrytag', + name='icon', + ), + migrations.DeleteModel( + name='Tag', + ), + migrations.DeleteModel( + name='Country', + ), + migrations.DeleteModel( + name='IndustryTag', + ), + migrations.DeleteModel( + name='Region', + ), + ] diff --git a/export_readiness/snippets.py b/export_readiness/snippets.py deleted file mode 100644 index 086faf8e..00000000 --- a/export_readiness/snippets.py +++ /dev/null @@ -1,64 +0,0 @@ -from django.db import models - -from wagtail.admin.panels import FieldPanel -from wagtail.snippets.models import register_snippet - - -@register_snippet -class Tag(models.Model): - name = models.CharField(max_length=100, unique=True) - - def __str__(self): - return self.name - - panels = [ - FieldPanel('name') - ] - - -@register_snippet -class IndustryTag(models.Model): - name = models.CharField(max_length=100, unique=True) - icon = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' - ) - - def __str__(self): - return self.name - - panels = [ - FieldPanel('name'), - FieldPanel('icon') - ] - - -@register_snippet -class Region(models.Model): - name = models.CharField(max_length=100, unique=True) - - def __str__(self): - return self.name - - panels = [ - FieldPanel('name') - ] - - -@register_snippet -class Country(models.Model): - name = models.CharField(max_length=100, unique=True) - slug = models.CharField(max_length=100, unique=True) - region = models.ForeignKey(Region, null=True, blank=True, on_delete=models.SET_NULL) - - def __str__(self): - return self.name - - panels = [ - FieldPanel('name'), - FieldPanel('slug'), - FieldPanel('region') - ] diff --git a/great_international/migrations/0161_alter_internationalarticlelistingpage_tags_and_more.py b/great_international/migrations/0161_alter_internationalarticlelistingpage_tags_and_more.py new file mode 100644 index 00000000..3c96dcb5 --- /dev/null +++ b/great_international/migrations/0161_alter_internationalarticlelistingpage_tags_and_more.py @@ -0,0 +1,40 @@ +# Generated by Django 4.1.9 on 2023-06-14 22:30 + +from django.db import migrations +import modelcluster.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0032_auto_20230614_0954'), + ('great_international', '0160_auto_20230505_1933'), + ] + + operations = [ + migrations.AlterField( + model_name='internationalarticlelistingpage', + name='tags', + field=modelcluster.fields.ParentalManyToManyField(blank=True, to='core.tag'), + ), + migrations.AlterField( + model_name='internationalarticlepage', + name='tags', + field=modelcluster.fields.ParentalManyToManyField(blank=True, to='core.tag'), + ), + migrations.AlterField( + model_name='internationalcampaignpage', + name='tags', + field=modelcluster.fields.ParentalManyToManyField(blank=True, to='core.tag'), + ), + migrations.AlterField( + model_name='internationalinvestmentsectorpage', + name='tags', + field=modelcluster.fields.ParentalManyToManyField(blank=True, to='core.tag'), + ), + migrations.AlterField( + model_name='internationaltopiclandingpage', + name='tags', + field=modelcluster.fields.ParentalManyToManyField(blank=True, to='core.tag'), + ), + ]