Skip to content

Instantly share code, notes, and snippets.

View abegong's full-sized avatar

Abe Gong abegong

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jamescasbon
jamescasbon / rest.py
Created June 17, 2011 10:53
REST handlers for backbone.js based on cyclone
# hmm no imports ;)
class BaseHandler(cyclone.web.RequestHandler):
def get_current_user(self):
return self.get_secure_cookie("user")
class LoginHandler(BaseHandler):
def get(self):
err = self.get_argument("e", None)
self.finish("""