コード例 #1
0
ファイル: app.py プロジェクト: CCLab/Wiki-Revisor
def purge_db():
    wdb.init_db( db_path, drop=True )

    return "Done sucessfuly"
コード例 #2
0
ファイル: app.py プロジェクト: CCLab/Wiki-Revisor
    return template( 'stats', template_dict )

# static files
from bottle import static_file

@route('/static/css/<filename>')
def server_static(filename):
    return static_file(filename, root='static/css')

@route('/static/img/<filename>')
def server_static(filename):
    return static_file(filename, root='static/img')

@route('/static/js/<filename>')
def server_static(filename):
    return static_file(filename, root='static/js')


#Remove all data from db
#TODO: REMOVE when not needed!!!!!
@route('/purge/')
def purge_db():
    wdb.init_db( db_path, drop=True )

    return "Done sucessfuly"


# create dbs if not exist
wdb.init_db( db_path, drop=False )
run( host='localhost', port=8080 )