Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dmoss18 committed May 9, 2012
0 parents commit d43da32
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 0 deletions.
17 changes: 17 additions & 0 deletions app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
application: chocolate-test
version: 1
runtime: python27
api_version: 1
threadsafe: yes

handlers:
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico

- url: .*
script: chocolatehomes.app

libraries:
- name: webapp2
version: "2.5.1"
16 changes: 16 additions & 0 deletions chocolatehomes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import webapp2

from google.appengine.api import users

class MainPage(webapp2.RequestHandler):
def get(self):
user = users.get_current_user()

if user:
self.response.headers['Content-Type'] = 'text/plain'
self.response.out.write('Hello, ' + user.nickname())
else:
self.redirect(users.create_login_url(self.request.uri))

app = webapp2.WSGIApplication([('/', MainPage)],
debug=True)
Binary file added chocolatehomes.pyc
Binary file not shown.
Binary file added favicon.ico
Binary file not shown.
12 changes: 12 additions & 0 deletions index.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
indexes:

# AUTOGENERATED

# This index.yaml is automatically updated whenever the dev_appserver
# detects that a new type of query is run. If you want to manage the
# index.yaml file manually, remove the above marker line (the line
# saying "# AUTOGENERATED"). If you want to manage some indexes
# manually, move them above the marker line. The index.yaml file is
# automatically uploaded to the admin console when you next deploy
# your application using appcfg.py.

Binary file added main.pyc
Binary file not shown.
24 changes: 24 additions & 0 deletions temp/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import webapp2

class MainHandler(webapp2.RequestHandler):
def get(self):
self.response.out.write('Hello world!')

app = webapp2.WSGIApplication([('/', MainHandler)],
debug=True)

0 comments on commit d43da32

Please sign in to comment.