Skip to content

Commit

Permalink
Merge pull request #3444 from uktrade/BUG-GRTLV-359-Dropdown-heroSnippet
Browse files Browse the repository at this point in the history
GRTLV-359 : Bug fix for drop down on Hero Snippet
  • Loading branch information
divyaparameswaran authored Oct 2, 2024
2 parents 2ade42c + 6cfe536 commit dec6f6b
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
Binary file modified core/geolocation_data/GeoLite2-City.mmdb
Binary file not shown.
Binary file modified core/geolocation_data/GeoLite2-Country.mmdb
Binary file not shown.
27 changes: 27 additions & 0 deletions core/migrations/0160_alter_herosnippet_slug.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Generated by Django 4.2.15 on 2024-10-01 16:40

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('core', '0159_remove_regiontagged_content_type_and_more'),
]

operations = [
migrations.AlterField(
model_name='herosnippet',
name='slug',
field=models.CharField(
choices=[
('export-academy-listing-page-hero', 'Hero for the Export Academy listing page'),
('export-academy-registration-page-hero', 'Hero for the Export Academy registration page'),
],
help_text='Select the use-case for this snippet from a fixed list of choices',
max_length=255,
unique=True,
verbose_name='Purpose',
),
),
]
7 changes: 7 additions & 0 deletions core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2133,6 +2133,13 @@ class HeroSnippet(NonPageContentSnippetBase, NonPageContentSEOMixin):
'page_path': '/export-academy/registration/',
},
}
slug = models.CharField(
max_length=255,
unique=True,
verbose_name='Purpose',
help_text='Select the use-case for this snippet from a fixed list of choices',
choices=[(key, val['title']) for key, val in slug_options.items()],
)
title = models.CharField(
max_length=255,
null=True,
Expand Down

0 comments on commit dec6f6b

Please sign in to comment.