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
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)
def make_capacity_registrants(self, govdelivery_code): registrant = ConferenceRegistration(govdelivery_code=govdelivery_code) ConferenceRegistration.objects.bulk_create([registrant] * self.capacity)
def make_registrants(self, handler, count, code=None): code = code or handler.block_value['code'] ConferenceRegistration.objects.bulk_create( [ConferenceRegistration(code=code)] * count)