Skip to content

Instantly share code, notes, and snippets.

@binarymatt
Created February 5, 2013 02:25
Show Gist options
  • Save binarymatt/4711598 to your computer and use it in GitHub Desktop.
Save binarymatt/4711598 to your computer and use it in GitHub Desktop.
class AccountEvent(object):
def __init__(self, request, user):
self.user = user
self.request = request
class SignupEvent(AccountEvent):
pass
class LoginEvent(AccountEvent):
pass
@subscriber(LoginEvent)
def login_complete(event):
logger.debug(event.user.email)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment