def POST(self, id): data = web.input() filtration = '%s;&xg&;%s' % (data.filter_tag, data.filter_attr) for i in range(0, int(data.filter_text_num), 2): filtration += ';&xg&;%s;&xg&;%s' % (eval('data.filter_textstart_%s' % i), eval('data.filter_textend_%s' % (i + 1))) info = json.loads(data.info) info['filtration'] = filtration info['imgreplace'] = data.get('imgreplace', '') data.info = json.dumps(info) model.update_url_extraction(id, data) form = model.select_url_extraction_id(id) data = self.organize(form[0]) return render.editpagerulebyid(data)
def GET(self, id): form = model.select_url_extraction_id(id) data = self.organize(form[0]) return render.editpagerulebyid(data)