Beispiel #1
0
def get_source_img(file_name):
    if parameters.getboolean('system', 'dev_mode'):
        set_no_cache()

        return static_file(file_name, root=os.path.join(base_path, 'site', 'static', 'source', 'img'))
    else:
        abort(401, 'Acesso não permitido.')
Beispiel #2
0
def get_css(file_name):
    if parameters.getboolean('system', 'dev_mode'):
        set_no_cache()

    return static_file(file_name, root=os.path.join(base_path, 'site', 'static', 'css'), mimetype='text/css')
Beispiel #3
0
def get_img(file_name):
    if parameters.getboolean('system', 'dev_mode'):
        set_no_cache()

    return static_file(file_name, root=os.path.join(base_path, 'site', 'static', 'release', 'img'))
Beispiel #4
0
def get_file(filepath):
    if parameters.getboolean('system', 'dev_mode'):
        set_no_cache()
    return static_file(filepath, root=os.path.join(base_path, 'site', 'static'))