Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.

Commit 1c48980

Browse files
committed
add region tags; Redis port: int
1 parent dafd8a0 commit 1c48980

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

mod0-baseline/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START mod0_baseline]
1516
import os
1617
import webapp2
1718
from google.appengine.ext import ndb
@@ -41,3 +42,4 @@ def get(self):
4142
app = webapp2.WSGIApplication([
4243
('/', MainHandler),
4344
], debug=True)
45+
# [END mod0_baseline]

mod13b-memorystore/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
ds_client = ndb.Client()
2323
HOUR = 3600
2424
REDIS_HOST = os.environ.get('REDIS_HOST', 'localhost')
25-
REDIS_PORT = os.environ.get('REDIS_PORT', '6379')
25+
REDIS_PORT = os.environ.get('REDIS_PORT', 6379)
2626
REDIS = redis.Redis(host=REDIS_HOST, port=REDIS_PORT)
2727

2828
class Visit(ndb.Model):

mod1b-flask/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START mod1b_flask]
1516
from flask import Flask, render_template, request
1617
from google.appengine.api import wrap_wsgi_app
1718
from google.appengine.ext import ndb
@@ -38,3 +39,4 @@ def root():
3839
store_visit(request.remote_addr, request.user_agent)
3940
visits = fetch_visits(10)
4041
return render_template('index.html', visits=visits)
42+
# [END mod1b_flask]

0 commit comments

Comments
 (0)