This repository was archived by the owner on Oct 1, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +7
-7
lines changed
step4-cloudds-cloudrun-py3
step4-cloudndb-cloudrun-py2
step4a-cloudrun-bldpks-py3 Expand file tree Collapse file tree 7 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ def store_visit(remote_addr, user_agent):
2626
2727def fetch_visits (limit ):
2828 return (v .to_dict () for v in Visit .query ().order (
29- - Visit .timestamp ).fetch_page (limit )[ 0 ] )
29+ - Visit .timestamp ).fetch (limit ))
3030
3131class MainHandler (webapp2 .RequestHandler ):
3232 def get (self ):
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ def store_visit(remote_addr, user_agent):
2626
2727def fetch_visits (limit ):
2828 return (v .to_dict () for v in Visit .query ().order (
29- - Visit .timestamp ).fetch_page (limit )[ 0 ] )
29+ - Visit .timestamp ).fetch (limit ))
3030
3131@app .route ('/' )
3232def root ():
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ def store_visit(remote_addr, user_agent):
2929def fetch_visits (limit ):
3030 with ds_client .context ():
3131 return (v .to_dict () for v in Visit .query ().order (
32- - Visit .timestamp ).fetch_page (limit )[ 0 ] )
32+ - Visit .timestamp ).fetch (limit ))
3333
3434@app .route ('/' )
3535def root ():
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ def store_visit(remote_addr, user_agent):
2929def fetch_visits (limit ):
3030 with ds_client .context ():
3131 return (v .to_dict () for v in Visit .query ().order (
32- - Visit .timestamp ).fetch_page (limit )[ 0 ] )
32+ - Visit .timestamp ).fetch (limit ))
3333
3434@app .route ('/' )
3535def root ():
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ def fetch_visits(limit):
3535@app .route ('/' )
3636def root ():
3737 store_visit (request .remote_addr , request .user_agent )
38- visits = fetch_visits (10 ) or () # empty sequence if None
38+ visits = fetch_visits (10 )
3939 return render_template ('index.html' , visits = visits )
4040
4141if __name__ == '__main__' :
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ def fetch_visits(limit):
3434@app .route ('/' )
3535def root ():
3636 store_visit (request .remote_addr , request .user_agent )
37- visits = fetch_visits (10 ) or () # empty sequence if None
37+ visits = fetch_visits (10 )
3838 return render_template ('index.html' , visits = visits )
3939
4040if __name__ == '__main__' :
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ def fetch_visits(limit):
3535@app .route ('/' )
3636def root ():
3737 store_visit (request .remote_addr , request .user_agent )
38- visits = fetch_visits (10 ) or () # empty sequence if None
38+ visits = fetch_visits (10 )
3939 return render_template ('index.html' , visits = visits )
4040
4141if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments