def post(self): """Validates the information placed on the form by the user. It also calls the function to create an instance of a Spoogler in the Datastore and displays messages according to what the user has written on the fields of the form (success or failure)""" token_value = 0 template_context = {} get_spoogler_context(self.request, template_context) template_context['confirmation_ldap'] = template_context['googler_ldap'] # Initialize the template fields that contain multiple options in the form init_multiple_options(template_context) if FormHandler._validate_form(template_context): template_context['valid_form'] = True token_value = FormHandler._generate_token() if self._create_spoogler(template_context, token_value): self._send_confirmation_email(template_context['googler_ldap'], template_context['test'], token_value, template_context['full_name']) FormHandler._clean_context(template_context) else: template_context['valid_form'] = False self.response.out.write(FormHandler._render_template('main.html', template_context))
def post(self): """Validates the information placed on the form by the user. It also calls the function to create an instance of a Spoogler in the Datastore and displays messages according to what the user has written on the fields of the form (success or failure)""" token_value = 0 template_context = {} get_spoogler_context(self.request, template_context) template_context['confirmation_ldap'] = template_context[ 'googler_ldap'] # Initialize the template fields that contain multiple options in the form init_multiple_options(template_context) if FormHandler._validate_form(template_context): template_context['valid_form'] = True token_value = FormHandler._generate_token() if self._create_spoogler(template_context, token_value): self._send_confirmation_email(template_context['googler_ldap'], template_context['test'], token_value, template_context['full_name']) FormHandler._clean_context(template_context) else: template_context['valid_form'] = False self.response.out.write( FormHandler._render_template('main.html', template_context))
def get(self): """Displays the form for the Spoogler/Googler to fill out.""" # Initialize default options template_context = {} get_spoogler_context(self.request, template_context) template_context['valid_form'] = True template_context['successful_submission'] = False template_context['confirmation_ldap'] = "" # Initialize the template fields that contain multiple options in the form init_multiple_options(template_context) self.response.out.write(self._render_template('main.html', template_context))
def get(self): """Displays the form for the Spoogler/Googler to fill out.""" # Initialize default options template_context = {} get_spoogler_context(self.request, template_context) template_context['valid_form'] = True template_context['successful_submission'] = False template_context['confirmation_ldap'] = "" # Initialize the template fields that contain multiple options in the form init_multiple_options(template_context) self.response.out.write( self._render_template('main.html', template_context))
def update(self, template_context): init_multiple_options(template_context) self.response.out.write( self._render_template('admin.html', template_context))