Exemple #1
0
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)
Exemple #2
0
def i_root():
    return i_dir_entry(uri(''))
Exemple #3
0
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)
Exemple #4
0
def f_style_css():
    u = uri('style.css', 'static')
    if (u.exists):
        return send_file(u.path, mimetype='text/css')
    else:
        abort(404)
Exemple #5
0
def f_favicon_ico():
    u = uri('favicon.ico', 'static')
    if (u.exists):
        return send_file(u.path, mimetype='image/x-icon')
    else:
        abort(404)