From 84f851ad3194356414047f3ae86cae363d0d3d4e Mon Sep 17 00:00:00 2001 From: Manatsawin Hanmongkolchai Date: Fri, 18 Dec 2015 11:06:39 +0700 Subject: [PATCH] Show event/group cover in directory --- User/models.py | 4 ---- ui/static/templates/eventbrowse.html | 4 +--- ui/static/templates/groupbrowser.html | 2 +- ui/static/templates/groupbrowser_cat.html | 4 ++-- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/User/models.py b/User/models.py index 5a07b66..80afba1 100644 --- a/User/models.py +++ b/User/models.py @@ -71,7 +71,3 @@ def create_profile(sender, instance, created, **kwargs): """Create a matching profile whenever a user object is created.""" if created: profile, new = UserProfile.objects.get_or_create(user=instance) - if profile.gender == 'Male' or 'M': - profile.picture = File(open('media/default/male.png')) - else: - profile.picture = File(open('media/default/female.png')) \ No newline at end of file diff --git a/ui/static/templates/eventbrowse.html b/ui/static/templates/eventbrowse.html index c82abbb..35c06e5 100644 --- a/ui/static/templates/eventbrowse.html +++ b/ui/static/templates/eventbrowse.html @@ -6,8 +6,7 @@

Upcoming events

Featured events

-
-
+

{{first_event.name}}

{{first_event.start_date}}
@@ -23,7 +22,6 @@

{{first_event.name}}

-

{{data.name}}

{{data.start_date}}
diff --git a/ui/static/templates/groupbrowser.html b/ui/static/templates/groupbrowser.html index a6a434f..e01fd25 100644 --- a/ui/static/templates/groupbrowser.html +++ b/ui/static/templates/groupbrowser.html @@ -6,7 +6,7 @@

Find interest groups to join

Featured group

-
+

{{allGroups[0].name}}

diff --git a/ui/static/templates/groupbrowser_cat.html b/ui/static/templates/groupbrowser_cat.html index 00d4add..a979e25 100644 --- a/ui/static/templates/groupbrowser_cat.html +++ b/ui/static/templates/groupbrowser_cat.html @@ -4,7 +4,7 @@

{{category}}

-
+

{{g.name}}

@@ -19,7 +19,7 @@

{{g.name}}

-
+

{{data.name}}