Add name pronunciation to speaker profile

This commit is contained in:
Joel Addison 2024-04-09 21:28:23 +10:00
parent 4fa0341563
commit 5557802860
4 changed files with 27 additions and 0 deletions

View file

@ -220,6 +220,8 @@ def has_contact_perm(user):
def make_speaker_dict(speaker, can_view_contact_details): def make_speaker_dict(speaker, can_view_contact_details):
return { return {
'name': speaker.name, 'name': speaker.name,
'name_pronunciation': speaker.name_pronunciation,
'pronouns': speaker.pronouns,
'twitter': speaker.twitter_username, 'twitter': speaker.twitter_username,
'mastodon': speaker.mastodon_username, 'mastodon': speaker.mastodon_username,
'contact': speaker.email if can_view_contact_details else 'redacted', 'contact': speaker.email if can_view_contact_details else 'redacted',

View file

@ -11,6 +11,7 @@ class SpeakerForm(forms.ModelForm):
model = Speaker model = Speaker
fields = [ fields = [
"name", "name",
"name_pronunciation",
"pronouns", "pronouns",
"biography", "biography",
"experience", "experience",

View file

@ -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'),
),
]

View file

@ -26,6 +26,12 @@ class Speaker(models.Model):
name = models.CharField(verbose_name=_("Name"), max_length=100, name = models.CharField(verbose_name=_("Name"), max_length=100,
help_text=_("As you would like it to appear in the" help_text=_("As you would like it to appear in the"
" conference programme.")) " 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"), pronouns = models.CharField(verbose_name=_("Pronouns"),
max_length=20, max_length=20,
blank=True, blank=True,