Files @ e726ff21a8ff
Branch filter:

Location: symposion_app/vendor/symposion/speakers/forms.py

James Polley
Create regidesk app

Shows summary of all attendees with a paid ticket, including
boarding_pass status.

Currently, regidesk allows staff with the requisite permission the
ability to view the checkin status of attendees, and email the user
their boarding pass email.

Included is a view for the user to retrieve their own QR code (in case
they got the plain-text version of the email, they can use this to
download an image to their phone for faster checkin)
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",
            "biography",
            "experience",
            "photo",
            "telephone",
            "homepage",
            "twitter_username",
            "accessibility",
            "travel_assistance",
            "accommodation_assistance",
            "agreement",
        ]

    def __init__(self, *a, **k):
        super(SpeakerForm, self).__init__(*a, **k)
        self.fields['agreement'].required = True

    def clean_twitter_username(self):
        value = self.cleaned_data["twitter_username"]
        if value.startswith("@"):
            value = value[1:]
        return value