Files
@ f5eabe0aa35a
Branch filter:
Location: symposion_app/vendor/symposion/speakers/forms.py - annotation
f5eabe0aa35a
1.0 KiB
text/x-python
Update wording for sessions
2b7f5546a094 2b7f5546a094 2b7f5546a094 2b7f5546a094 2b7f5546a094 2b7f5546a094 36ab6d599ffc fb5eaea880cb fb5eaea880cb 2b7f5546a094 2b7f5546a094 2b7f5546a094 2b7f5546a094 630bf4086135 2b7f5546a094 aa56ac00c36a 2b7f5546a094 630bf4086135 f72490b1eb01 aa56ac00c36a c7ce7fe02068 630bf4086135 217f2f32c169 630bf4086135 630bf4086135 630bf4086135 c0e9b90476d3 2b7f5546a094 c7ce7fe02068 c0e9b90476d3 c0e9b90476d3 c0e9b90476d3 b20dc75ea6a2 f72490b1eb01 c0e9b90476d3 c7ce7fe02068 c7ce7fe02068 c7ce7fe02068 c7ce7fe02068 c7ce7fe02068 | from django import forms
from symposion.speakers.models import Speaker
class SpeakerForm(forms.ModelForm):
required_css_class = 'label-required'
class Meta:
model = Speaker
fields = [
"name",
"pronouns",
"biography",
"experience",
"photo",
"telephone",
"local_timezone",
"homepage",
"twitter_username",
"mastodon_username",
"accessibility",
"travel_assistance",
"accommodation_assistance",
"assistance",
"agreement",
]
def __init__(self, *a, **k):
super(SpeakerForm, self).__init__(*a, **k)
self.fields['agreement'].required = True
self.fields['biography'].required = True
self.fields['local_timezone'].required = True
def clean_twitter_username(self):
value = self.cleaned_data["twitter_username"]
if value.startswith("@"):
value = value[1:]
return value
|