Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions code/ch4_app/ch4_starter_video_collector/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
venv/
.idea/

6 changes: 3 additions & 3 deletions code/ch4_app/ch4_starter_video_collector/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
flask
Werkzeug
flask~=0.12.3
Werkzeug~=0.14.1
pydantic
more_itertools
MarkupSafe
Jinja2
Jinja2==2.7
2 changes: 1 addition & 1 deletion code/ch4_app/ch4_starter_video_collector/views/feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion code/ch4_app/ch4_starter_video_collector/views/home.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions code/ch4_app/ch4_starter_video_collector/views/videos.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
blueprint = flask.Blueprint('videos', __name__, template_folder='templates')


@blueprint.get('/videos/category/<cat_name>')
@blueprint.route('/videos/category/<cat_name>')
@response(template_file='videos/category.html')
def category(cat_name: str):
vm = CategoryViewModel(cat_name)
return vm.to_dict()


@blueprint.get('/videos/play/<video_id>')
@blueprint.route('/videos/play/<video_id>')
@response(template_file='videos/play.html')
def play(video_id: str):
vm = PlayViewModel(video_id)
Expand Down