예제 #1
0
def download_pack(pid):
    pack = app.datamgr.get_pack_by_id(pid)
    if not pack:
        abort(400, "Unknown pack!")
    path = pack.get("filepath")
    filename = pack.get("filename")
    return static_file(path, root="/", download=filename)
예제 #2
0
파일: packs.py 프로젝트: 6jo6jo/shinken
def download_pack(pid):
    pack = app.datamgr.get_pack_by_id(pid)
    if not pack:
        abort(400, 'Unknown pack!')
    path = pack.get('filepath')
    filename = pack.get('filename')
    return static_file(path, root='/', download=filename)
예제 #3
0
파일: webuidaemon.py 프로젝트: Dabg/shinken
 def server_static(path):
     #print "Getting static files from", os.path.join(my_dir, 'htdocs'), path
     return static_file(path, root=os.path.join(bottle_dir, 'htdocs'))
예제 #4
0
파일: webuidaemon.py 프로젝트: Dabg/shinken
 def plugin_static(path):
     #print "Addr f", plugin_static, plugin_static.entry
     return static_file(path, root=os.path.join(m_dir, 'htdocs'))
예제 #5
0
파일: eue.py 프로젝트: BaniaHP/shinken
def eue_media(media):
    user = checkauth()    
    create_media(media)
    return static_file(media,root=media_path)