Permalink
Browse files

Load video json into Flask app

  • Loading branch information...
georgevreilly committed Feb 2, 2013
1 parent 3e23120 commit f11c3feafd18bc13b387d338417f03589d6187b3
Showing with 10 additions and 3 deletions.
  1. +8 −2 gae_flask_app/app.py
  2. +2 −1 gae_flask_app/settings.py
View
@@ -1,11 +1,17 @@
+from __future__ import absolute_import
+
from flask import Flask
+from gae_flask_app.videos import load_video_json
+import logging
def create_app(config):
app = Flask(__name__)
app.config.from_object(config)
+ json_filename = app.config['VIDEO_JSON']
+ vj = load_video_json(json_filename)
+ logging.info("Loaded video data from '%s'", json_filename)
- # Later register blueprints here.
- # ...
+ # Register blueprints here.
from gae_flask_app.hello_gae import hello_gae
app.register_blueprint(hello_gae, url_prefix="/")
return app
@@ -1 +1,2 @@
-DEBUG=True
+DEBUG=True # True => Security Hole
+VIDEO_JSON="test-videos.json"

0 comments on commit f11c3fe

Please sign in to comment.