Mini Shell

Direktori : /opt/bakmgr/lib/python3.6/site-packages/bakmgr/dash/routing/
Upload File :
Current File : //opt/bakmgr/lib/python3.6/site-packages/bakmgr/dash/routing/static.py

from pathlib import Path
from flask import current_app as app
from flask import redirect, url_for, send_from_directory

NINETY_DAYS = 7776000


@app.route('/')
def index_page():
    return redirect(url_for('config_page'))


@app.route('/favicon.ico')
def favicon():
    return send_from_directory(
        Path(app.root_path, 'static'),
        'favicon.ico',
        mimetype='image/vnd.microsoft.icon',
        max_age=NINETY_DAYS,
    )


@app.route('/backup_mgr.png')
def backup_mgr_png():
    return send_from_directory(
        Path(app.root_path, 'static'),
        'backup_mgr.png',
        mimetype='image/png',
        max_age=NINETY_DAYS,
    )

Zerion Mini Shell 1.0