c7ce7fe020
This change is based on the PyOhio fork located at: https://github.com/PyCon/pycon/search?utf8=%E2%9C%93&q=twitter_username
22 lines
496 B
Python
22 lines
496 B
Python
from __future__ import unicode_literals
|
|
from django import forms
|
|
|
|
from symposion.speakers.models import Speaker
|
|
|
|
|
|
class SpeakerForm(forms.ModelForm):
|
|
|
|
class Meta:
|
|
model = Speaker
|
|
fields = [
|
|
"name",
|
|
"biography",
|
|
"photo",
|
|
"twitter_username",
|
|
]
|
|
|
|
def clean_twitter_username(self):
|
|
value = self.cleaned_data["twitter_username"]
|
|
if value.startswith("@"):
|
|
value = value[1:]
|
|
return value
|