Commit 839745f3 authored by Leonidas Poulopoulos's avatar Leonidas Poulopoulos

Patch user model to include user peer in __unicode__

parent 7e967cf0
......@@ -31,6 +31,19 @@ from utils.randomizer import id_generator as id_gen
from tasks import *
def user_unicode_patch(self):
peer = None
try:
peer = self.get_profile().peer.peer_name
except:
pass
if peer:
return '%s.::.%s' % (self.username, peer)
return self.username
User.__unicode__ = user_unicode_patch
FORMAT = '%(asctime)s %(levelname)s: %(message)s'
logging.basicConfig(format=FORMAT)
logger = logging.getLogger(__name__)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment