Skip to content

Instantly share code, notes, and snippets.

@LuqiPan
Created January 24, 2017 06:23
Show Gist options
  • Save LuqiPan/ca77d4320e7007bc4822951efb47b5ed to your computer and use it in GitHub Desktop.
Save LuqiPan/ca77d4320e7007bc4822951efb47b5ed to your computer and use it in GitHub Desktop.
Log Driven Development
def login(login, password):
# ...
if request.POST['VIP_KEY'] == '5fa3e7a21e34714b44720836573a71ce':
request.session['is_vip'] = True
# log_helper.log method accept
log_helper.log('vip_log', {'is_vip': True, 'user_id': user.id})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment