Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3e23120
commit f11c3fe
Showing
2 changed files
with
10 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,11 +1,17 @@ | |||
from __future__ import absolute_import | |||
|
|||
from flask import Flask | from flask import Flask | ||
from gae_flask_app.videos import load_video_json | |||
import logging | |||
|
|
||
def create_app(config): | def create_app(config): | ||
app = Flask(__name__) | app = Flask(__name__) | ||
app.config.from_object(config) | 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 | from gae_flask_app.hello_gae import hello_gae | ||
app.register_blueprint(hello_gae, url_prefix="/") | app.register_blueprint(hello_gae, url_prefix="/") | ||
return app | return app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1 +1,2 @@ | |||
DEBUG=True | DEBUG=True # True => Security Hole | ||
VIDEO_JSON="test-videos.json" |