def index(): try: result = NwsSTORY.query.filter_by(document_status='SHOW').limit(5).all() return render_template('search.html',searchResult=result ,EncodeStr=Encode) except: db.create_all() return redirect(config.CFG_WEBNEWS_MENU_INDEX)
def index(): try: result = NwsSTORY.query.filter_by( document_status='SHOW').limit(5).all() return render_template('search.html', searchResult=result, EncodeStr=Encode) except: db.create_all() return redirect(config.CFG_WEBNEWS_MENU_INDEX)
def setUp(self): """Create the tables.""" from invenio.ext.sqlalchemy import db db.create_all()