def i_dir_entry(u): if u.exists: index = uri(u.request_uri, 'index') if index.exists: return m_render(index, True) else: if config.list_dir: return m_listdir(u) else: abort(403) else: return abort(404)
def i_root(): return i_dir_entry(uri(''))
def i_entry(request_uri): u = uri(request_uri) if u.type == 'dir': return i_dir_entry(u) elif u.type == 'document': return i_doc_entry(u)
def f_style_css(): u = uri('style.css', 'static') if (u.exists): return send_file(u.path, mimetype='text/css') else: abort(404)
def f_favicon_ico(): u = uri('favicon.ico', 'static') if (u.exists): return send_file(u.path, mimetype='image/x-icon') else: abort(404)