From 555780286075070a6ec6aa5719fe81f22b0c6974 Mon Sep 17 00:00:00 2001 From: Joel Addison Date: Tue, 9 Apr 2024 21:28:23 +1000 Subject: [PATCH] Add name pronunciation to speaker profile --- vendor/symposion/schedule/views.py | 2 ++ vendor/symposion/speakers/forms.py | 1 + .../0012_speaker_name_pronunciation.py | 18 ++++++++++++++++++ vendor/symposion/speakers/models.py | 6 ++++++ 4 files changed, 27 insertions(+) create mode 100644 vendor/symposion/speakers/migrations/0012_speaker_name_pronunciation.py diff --git a/vendor/symposion/schedule/views.py b/vendor/symposion/schedule/views.py index c66ccb9a..0da27e82 100644 --- a/vendor/symposion/schedule/views.py +++ b/vendor/symposion/schedule/views.py @@ -220,6 +220,8 @@ def has_contact_perm(user): def make_speaker_dict(speaker, can_view_contact_details): return { 'name': speaker.name, + 'name_pronunciation': speaker.name_pronunciation, + 'pronouns': speaker.pronouns, 'twitter': speaker.twitter_username, 'mastodon': speaker.mastodon_username, 'contact': speaker.email if can_view_contact_details else 'redacted', diff --git a/vendor/symposion/speakers/forms.py b/vendor/symposion/speakers/forms.py index 46466a87..ef642557 100644 --- a/vendor/symposion/speakers/forms.py +++ b/vendor/symposion/speakers/forms.py @@ -11,6 +11,7 @@ class SpeakerForm(forms.ModelForm): model = Speaker fields = [ "name", + "name_pronunciation", "pronouns", "biography", "experience", diff --git a/vendor/symposion/speakers/migrations/0012_speaker_name_pronunciation.py b/vendor/symposion/speakers/migrations/0012_speaker_name_pronunciation.py new file mode 100644 index 00000000..4d4cc41b --- /dev/null +++ b/vendor/symposion/speakers/migrations/0012_speaker_name_pronunciation.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.28 on 2024-04-09 10:15 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('symposion_speakers', '0011_auto_20221208_0102'), + ] + + operations = [ + migrations.AddField( + model_name='speaker', + name='name_pronunciation', + field=models.CharField(blank=True, help_text='Guidance on how to pronounce your name, to assist our team with introducing you correctly for your presentation.', max_length=255, verbose_name='Name Pronunciation'), + ), + ] diff --git a/vendor/symposion/speakers/models.py b/vendor/symposion/speakers/models.py index 2f9aec2b..e43add90 100644 --- a/vendor/symposion/speakers/models.py +++ b/vendor/symposion/speakers/models.py @@ -26,6 +26,12 @@ class Speaker(models.Model): name = models.CharField(verbose_name=_("Name"), max_length=100, help_text=_("As you would like it to appear in the" " conference programme.")) + name_pronunciation = models.CharField(verbose_name=_("Name Pronunciation"), + max_length=255, + blank=True, + help_text=_("Guidance on how to pronounce your name, to assist our team " + "with introducing you correctly for your presentation."), + ) pronouns = models.CharField(verbose_name=_("Pronouns"), max_length=20, blank=True,