diff --git a/code/ch4_app/ch4_starter_video_collector/.gitignore b/code/ch4_app/ch4_starter_video_collector/.gitignore new file mode 100644 index 0000000..d0fc8b5 --- /dev/null +++ b/code/ch4_app/ch4_starter_video_collector/.gitignore @@ -0,0 +1,3 @@ +venv/ +.idea/ + diff --git a/code/ch4_app/ch4_starter_video_collector/requirements.txt b/code/ch4_app/ch4_starter_video_collector/requirements.txt index f2e5eba..bdf1975 100644 --- a/code/ch4_app/ch4_starter_video_collector/requirements.txt +++ b/code/ch4_app/ch4_starter_video_collector/requirements.txt @@ -1,6 +1,6 @@ -flask -Werkzeug +flask~=0.12.3 +Werkzeug~=0.14.1 pydantic more_itertools MarkupSafe -Jinja2 +Jinja2==2.7 diff --git a/code/ch4_app/ch4_starter_video_collector/views/feed.py b/code/ch4_app/ch4_starter_video_collector/views/feed.py index e7dcb70..73863b2 100644 --- a/code/ch4_app/ch4_starter_video_collector/views/feed.py +++ b/code/ch4_app/ch4_starter_video_collector/views/feed.py @@ -8,7 +8,7 @@ blueprint = flask.Blueprint('feed', __name__, template_folder='templates') -@blueprint.get('/feed') +@blueprint.route('/feed') @response(template_file='feed/index.html') def index(): time.sleep(5) diff --git a/code/ch4_app/ch4_starter_video_collector/views/home.py b/code/ch4_app/ch4_starter_video_collector/views/home.py index cf4b773..25c481b 100644 --- a/code/ch4_app/ch4_starter_video_collector/views/home.py +++ b/code/ch4_app/ch4_starter_video_collector/views/home.py @@ -6,7 +6,7 @@ blueprint = flask.Blueprint('home', __name__, template_folder='templates') -@blueprint.get('/') +@blueprint.route('/') @response(template_file='home/index.html') def index(): vm = IndexViewModel() diff --git a/code/ch4_app/ch4_starter_video_collector/views/videos.py b/code/ch4_app/ch4_starter_video_collector/views/videos.py index d211517..ef38f5a 100644 --- a/code/ch4_app/ch4_starter_video_collector/views/videos.py +++ b/code/ch4_app/ch4_starter_video_collector/views/videos.py @@ -7,14 +7,14 @@ blueprint = flask.Blueprint('videos', __name__, template_folder='templates') -@blueprint.get('/videos/category/') +@blueprint.route('/videos/category/') @response(template_file='videos/category.html') def category(cat_name: str): vm = CategoryViewModel(cat_name) return vm.to_dict() -@blueprint.get('/videos/play/') +@blueprint.route('/videos/play/') @response(template_file='videos/play.html') def play(video_id: str): vm = PlayViewModel(video_id)