Skip to content
This repository has been archived by the owner on Jun 19, 2021. It is now read-only.

Commit

Permalink
update user repr to include email
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerdave committed Feb 17, 2018
1 parent 37b6a1e commit da6c257
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pinaxcon/monkey_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,20 @@ def process_request(self, request):
def do_monkey_patch():
patch_stripe_card_defaults()
patch_conference_schedule()
update_user_representation()

# Remove this function from existence
global do_monkey_patch
do_monkey_patch = lambda: None


def update_user_representation():
def user_repr(user):
return '{} ({})'.format(user.email, user.username)

User.add_to_class("__str__", user_repr)


def patch_stripe_card_defaults():
from pinax.stripe.actions import sources
from collections import defaultdict
Expand Down

0 comments on commit da6c257

Please sign in to comment.