diff --git a/events/models/profiles.py b/events/models/profiles.py index 219dfe0..ac3b921 100644 --- a/events/models/profiles.py +++ b/events/models/profiles.py @@ -7,6 +7,7 @@ from .locale import * import pytz import datetime +import hashlib class UserProfile(models.Model): " Store profile information about a user " @@ -105,6 +106,12 @@ def _getUserProfile(self): profile.realname = '%s %s' % (self.first_name, self.last_name) else: profile.realname = self.first_name + + if self.email: + h = hashlib.md5() + h.update(bytearray(profile.user.email, 'utf8')) + profile.avatar = 'http://www.gravatar.com/avatar/%s.jpg?d=mm' % h.hexdigest() + profile.save() return profile diff --git a/get_together/templates/get_together/events/show_event.html b/get_together/templates/get_together/events/show_event.html index 43ca213..a9f23e0 100644 --- a/get_together/templates/get_together/events/show_event.html +++ b/get_together/templates/get_together/events/show_event.html @@ -37,13 +37,14 @@

Attendees ({{attendee_list.count}})


{% for attendee in attendee_list %} -
-

- {{ attendee.user }} +

+
+ +
+
{{attendee.user}} {{ attendee.status_name }}
{% if attendee.role > 0 %}{{ attendee.role_name }}{% endif %} -

+
-
{{ attendee.status_name }}
{% endfor %}
diff --git a/get_together/templates/get_together/teams/show_team.html b/get_together/templates/get_together/teams/show_team.html index 3fc2c12..fbbc1f8 100644 --- a/get_together/templates/get_together/teams/show_team.html +++ b/get_together/templates/get_together/teams/show_team.html @@ -42,11 +42,13 @@

Members


{% for member in member_list %} -
-

- {{member.user}} +

+
+ +
+
{{member.user}}
{% if member.role > 0 %}{{ member.role_name }}{% endif %} -

+
{% endfor %}