def _process(self): inherited_location = self.event.location_data inherited_location['inheriting'] = True form = SessionForm(obj=FormDefaults(colors=get_random_color(self.event), location_data=inherited_location), event=self.event) if form.validate_on_submit(): new_session = create_session(self.event, form.data) return self._get_response(new_session) return jsonify_form(form)
def _process(self): inherited_location = self.event.location_data inherited_location['inheriting'] = True form = SessionForm(obj=FormDefaults(colors=get_random_color(self.event), location_data=inherited_location), event=self.event) if form.validate_on_submit(): new_session = create_session(self.event, form.data) return self._get_response(new_session) return jsonify_form(form)