def page_preview(): url = request.args.get('currentTag', 0) url = url.strip("/") is_delete = request.args.get('isDeleteBtn', 0) is_riki_tab = request.args.get('isRikiLink', 0) if is_normal_href_link(url) and is_delete == '' and is_riki_tab != ('Riki' and 'Cancel' and 'Wikielodeon'): page = current_wiki.get_or_404(url) data = {} processor = Processor(page.content) data['html'], data['body'], data['meta'] = processor.process() return jsonify(result=data['html']) return "None"
def setUp(self): super(ProcessorTestCase, self).setUp() self.processor = Processor(self.page_content)
def preview(): data = {} processor = Processor(request.form['body']) data['html'], data['body'], data['meta'] = processor.process() return data['html']