def post(self): email = urllib.unquote(self.request.get('email')) if verify_user(email, self.response) == False: return keys = self.request.get_all('task_key') if len(keys) == 0: self.response.out.write(inspector.template.error('You should select at least one item.')) return if datastore.delete_tasks(keys) == True: self.redirect('/inspectors') else: self.response.out.write(inspector.template.error('Datastore delete error'))
def get(self): email = urllib.unquote(self.request.get('email')) if verify_user(email, self.response) == False: return template_values = { 'email': email, 'url': self.request.get('url'), 'xpath': self.request.get('xpath') } for k, v in template_values.items(): template_values[k] = urllib.quote(v) template_values['user'] = users.get_current_user() self.response.out.write(inspector.template.info('submit.html', template_values))
def get(self): email = urllib.unquote(self.request.get('email')) if verify_user(email, self.response) == False: return template_values = { 'email': email, 'url': self.request.get('url'), 'xpath': self.request.get('xpath') } for k, v in template_values.items(): template_values[k] = urllib.quote(v) template_values['user'] = users.get_current_user() self.response.out.write( inspector.template.info('submit.html', template_values))
def post(self): email = urllib.unquote(self.request.get('email')) if verify_user(email, self.response) == False: return url = urllib.unquote(self.request.get('url')) xpath = urllib.unquote(self.request.get('xpath')) status, html = inspector_job.get_html(url, xpath) if status == False: self.response.out.write(inspector.template.error(html)) return rval = datastore.add_task(email, url, xpath, html) if rval == True: self.redirect('/') else: self.response.out.write(inspector.template.error(rval))
def post(self): email = urllib.unquote(self.request.get('email')) if verify_user(email, self.response) == False: return keys = self.request.get_all('task_key') if len(keys) == 0: self.response.out.write( inspector.template.error( 'You should select at least one item.')) return if datastore.delete_tasks(keys) == True: self.redirect('/inspectors') else: self.response.out.write( inspector.template.error('Datastore delete error'))