Exemplo n.º 1
0
def internalerror():
    render = web.template.render(config.global_template_path, base='layout', cache=config.get_cache_config(), globals=globals())
    return web.notfound(render.internalerror())
Exemplo n.º 2
0
import os
from flask import Flask
from flask_caching import Cache
from dotenv import load_dotenv
from config import configure_app, get_cache_config

basedir = os.path.abspath(os.path.dirname(__file__))
load_dotenv(os.path.join(basedir, '.env'))

app = configure_app(Flask(__name__))
cache = Cache(app, config=get_cache_config(app))

from fib import controllers

if __name__ == '__main__':
    app.run()
Exemplo n.º 3
0
__author__ = 'whatting'
import web

import config


template_path = config.base_dir + "/app/views"

view = web.template.render(template_path, cache=config.get_cache_config(), globals=globals())
base_layout = web.template.render(config.global_template_path, cache=config.get_cache_config(), globals=globals())

def layout(page, content, **kwargs):
    # If you wanted to you could create a generic layout just for this module and use view to call it
    return base_layout.layout(page, content, **kwargs)