Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
changes after review
  • Loading branch information
yufengg committed Apr 27, 2016
commit d6e0e7a46046b7e09a410e334b904739497bdd80
4 changes: 0 additions & 4 deletions appengine/channel/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Chatactoe App Engine app
This application allows for 2-player tic tac toe and demonstrates the Channel API.

## Deployment
To deploy, run the following command, or see [here](https://cloud.google.com/appengine/docs/python/gettingstartedpython27/uploading) for more details about uploading your application.

`appcfg.py -A <YOUR_PROJECT_ID> update .`
Expand Down
9 changes: 3 additions & 6 deletions appengine/channel/app.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
# uncomment below and replace with your Project ID
# application: YOUR_PROJECT_ID
module: tictactoe
version: 1
runtime: python27
version: 1
api_version: 1
threadsafe: true

handlers:
- url: /.*
script: chatactoe.app
#script: chatactoe.py

libraries:
- name: webapp2
version: latest
version: "2.5.2"
- name: jinja2
version: latest
version: "2.6"
10 changes: 5 additions & 5 deletions appengine/channel/chatactoe.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -28,14 +27,15 @@
import random
import re
import json
import jinja2
import webapp2

from google.appengine.api import channel
from google.appengine.api import users
from google.appengine.api import app_identity
from google.appengine.ext import db

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flake8 will complain about this. It should be:

import datetime
import logging
import os
import random
import re
import json

from google.appengine.api import channel
from google.appengine.api import users
from google.appengine.ext import db
import jinja2
import webapp2

import jinja2
import webapp2


CLOUD_PROJECT_ID = 'your_project_id'
CLOUD_PROJECT_ID = app_identity.get_application_id()

class Game(db.Model):
"""All the data we store for a game"""
Expand Down