예제 #1
0
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)
예제 #2
0
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)
예제 #3
0
 def setUp(self):
     """Create the tables."""
     from invenio.ext.sqlalchemy import db
     db.create_all()
예제 #4
0
파일: __init__.py 프로젝트: osub3/invenio
 def setUp(self):
     """Create the tables."""
     from invenio.ext.sqlalchemy import db
     db.create_all()