Commit 07c03ebd authored by ale's avatar ale

postpone cache initialization

parent abaffdfe
......@@ -11,7 +11,7 @@ from flask import Flask, request, abort, g, render_template
from flask.ext.cache import Cache
app = Flask(__name__)
cache = Cache(app)
cache = Cache(config={'CACHE_TYPE': 'simple'})
@app.template_filter('formatstamp')
......@@ -77,6 +77,7 @@ def index():
def create_app():
# The env variable name is compatible with wsgi-app-installer.
app.config.from_envvar('APP_CONFIG', silent=True)
cache.init_app(app)
return app
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment