Exemplo n.º 1
0
    def save(self, commit=True):
        registration = ConferenceRegistration(
            govdelivery_code=self.govdelivery_code
        )

        details = dict(self.cleaned_data)
        email = details['email']

        registration.details = details

        if commit:
            # Subscribe this registrant to GovDelivery.
            self.govdelivery_subscribe(code=self.govdelivery_code, email=email)

            # Update their question response, if appropriate.
            if self.govdelivery_question_id and self.govdelivery_answer_id:
                self.govdelivery_question_response(
                    email=email,
                    question_id=self.govdelivery_question_id,
                    answer_id=self.govdelivery_answer_id
                )

            # Persist the registration to the database.
            registration.save()

        return registration
Exemplo n.º 2
0
    def save(self, commit=True):
        registration = ConferenceRegistration(
            govdelivery_code=self.govdelivery_code
        )

        details = dict(self.cleaned_data)
        email = details['email']

        registration.details = details

        if commit:
            # Subscribe this registrant to GovDelivery.
            self.govdelivery_subscribe(code=self.govdelivery_code, email=email)

            # Update their question response, if appropriate.
            if self.govdelivery_question_id and self.govdelivery_answer_id:
                self.govdelivery_question_response(
                    email=email,
                    question_id=self.govdelivery_question_id,
                    answer_id=self.govdelivery_answer_id
                )

            # Persist the registration to the database.
            registration.save()

        return registration
Exemplo n.º 3
0
    def save(self, commit=True):
        registration = ConferenceRegistration(
            govdelivery_code=self.govdelivery_code)

        details = dict(self.cleaned_data)
        email = details['email']

        registration.details = details

        if commit:
            # Subscribe this registrant to GovDelivery.
            self.govdelivery_subscribe(code=self.govdelivery_code, email=email)

            # Persist the registration to the database.
            registration.save()

        return registration
Exemplo n.º 4
0
    def save(self, commit=True):
        registration = ConferenceRegistration(
            govdelivery_code=self.govdelivery_code
        )

        details = dict(self.cleaned_data)
        email = details['email']

        registration.details = details

        if commit:
            # Subscribe this registrant to GovDelivery.
            self.govdelivery_subscribe(code=self.govdelivery_code, email=email)

            # Persist the registration to the database.
            registration.save()

        return registration
Exemplo n.º 5
0
 def make_capacity_registrants(self, govdelivery_code, attendee_type):
     registrant = ConferenceRegistration(
         govdelivery_code=govdelivery_code,
         details={'attendee_type': attendee_type})
     ConferenceRegistration.objects.bulk_create([registrant] *
                                                self.capacity)
Exemplo n.º 6
0
 def make_capacity_registrants(self, govdelivery_code):
     registrant = ConferenceRegistration(govdelivery_code=govdelivery_code)
     ConferenceRegistration.objects.bulk_create([registrant] *
                                                self.capacity)
Exemplo n.º 7
0
 def make_registrants(self, handler, count, code=None):
     code = code or handler.block_value['code']
     ConferenceRegistration.objects.bulk_create(
         [ConferenceRegistration(code=code)] * count)