Applied Will Norris's patch so that OAuth will work on localhost in the appengine Buzz sample
diff --git a/samples/appengine/main.py b/samples/appengine/main.py
index 9f63d50..06d1d06 100755
--- a/samples/appengine/main.py
+++ b/samples/appengine/main.py
@@ -33,8 +33,6 @@
 from google.appengine.ext.webapp import util
 from google.appengine.ext.webapp.util import login_required
 
-STEP2_URI = 'http://%s.appspot.com/auth_return' % os.environ['APPLICATION_ID']
-
 
 class Flow(db.Model):
   # FlowThreeLegged could also be stored in memcache.
@@ -77,7 +75,8 @@
                      scope='https://www.googleapis.com/auth/buzz',
                      xoauth_displayname='Example Web App')
 
-      authorize_url = flow.step1_get_authorize_url(STEP2_URI)
+      callback = self.request.relative_url('/auth_return')
+      authorize_url = flow.step1_get_authorize_url(callback)
       f = Flow(key_name=user.user_id(), flow=flow)
       f.put()
       self.redirect(authorize_url)