Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7209ae8

Browse filesBrowse files
committed
Infinite scroll now working on the video feed.
1 parent f99c3d5 commit 7209ae8
Copy full SHA for 7209ae8

File tree

Expand file treeCollapse file tree

1 file changed

+10
-0
lines changed
Filter options
  • code/ch7_infinite_scroll/ch7_final_video_collector/views
Expand file treeCollapse file tree

1 file changed

+10
-0
lines changed

‎code/ch7_infinite_scroll/ch7_final_video_collector/views/feed.py

Copy file name to clipboardExpand all lines: code/ch7_infinite_scroll/ch7_final_video_collector/views/feed.py
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import time
2+
13
import flask
24

35
from infrastructure.view_modifiers import response
@@ -13,3 +15,11 @@
1315
def index():
1416
vm = FeedViewModel(page_size=VIDEOS_PER_PAGE)
1517
return vm.to_dict()
18+
19+
20+
@blueprint.get('/feed/more_videos/<int:page>')
21+
@response(template_file='feed/partials/video_list.html')
22+
def more_videos(page: int):
23+
time.sleep(.5)
24+
vm = FeedViewModel(page_size=VIDEOS_PER_PAGE, page=page)
25+
return vm.to_dict()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.