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
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
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