Skip to content
Browse files

support for python2.7 runtime

  • Loading branch information...
1 parent 1d06ca2 commit 8a31cf7d835e07881eace9f96d651a2e1d66f481 @supernifty committed Jan 4, 2012
Showing with 22 additions and 3 deletions.
  1. +19 −0 app/app.py27.yaml
  2. +3 −3 app/main.py
View
19 app/app.py27.yaml
@@ -0,0 +1,19 @@
+application: market
+version: 1
+runtime: python27
+api_version: 1
+threadsafe: yes
+
+builtins:
+- appstats: on
+
+handlers:
+- url: /static
+ static_dir: static
+
+- url: /favicon.ico
+ static_files: static/favicon.ico
+ upload: static/favicon.ico
+
+- url: /.*
+ script: main.app
View
6 app/main.py
@@ -87,7 +87,7 @@ def post(self, key):
item = model.Item.get(key)
(ok, pay) = self.start_purchase(item)
if ok:
- self.redirect( pay.next_url() ) # go to paypal
+ self.redirect( pay.next_url().encode('ascii') ) # go to paypal
else:
data = {
'item': model.Item.get(key),
@@ -266,7 +266,7 @@ class NotFound (RequestHandler):
def get(self):
self.error(404)
-application = webapp.WSGIApplication( [
+app = webapp.WSGIApplication( [
('/', Home),
('/sell', Sell),
('/sell/(.*)/', Sell),
@@ -283,7 +283,7 @@ def get(self):
def main():
logging.getLogger().setLevel(logging.DEBUG)
- run_wsgi_app(application)
+ run_wsgi_app(app)
if __name__ == "__main__":
main()

0 comments on commit 8a31cf7

Please sign in to comment.
Something went wrong with that request. Please try again.