Merge lp:~daker/loco-team-portal/fix.1213858 into lp:loco-team-portal

Proposed by Adnane Belmadiaf
Status: Merged
Approved by: Michael Hall
Approved revision: 650
Merged at revision: 650
Proposed branch: lp:~daker/loco-team-portal/fix.1213858
Merge into: lp:loco-team-portal
Diff against target: 46 lines (+7/-4)
3 files modified
loco_directory/events/models.py (+3/-0)
loco_directory/teams/management/commands/lpupdate.py (+1/-1)
loco_directory/templates/events/team_event_detail_comments.inc.html (+3/-3)
To merge this branch: bzr merge lp:~daker/loco-team-portal/fix.1213858
Reviewer Review Type Date Requested Status
Michael Hall (community) Approve
Review via email: mp+182782@code.launchpad.net

Commit message

Fixed comments order
Changed the locoteams team, props CC

To post a comment you must log in.
Revision history for this message
Michael Hall (mhall119) wrote :

Looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'loco_directory/events/models.py'
2--- loco_directory/events/models.py 2013-05-11 14:07:21 +0000
3+++ loco_directory/events/models.py 2013-08-28 23:23:58 +0000
4@@ -181,6 +181,9 @@
5 total_maybe_attending_registered = queryset_count('attendee_profile', Attendee.objects.filter(team_event__id__exact=self.id).filter(promise="maybe"))
6 return total_maybe_attending_guests + total_maybe_attending_registered
7
8+ def comments_set(self):
9+ return self.teameventcomment_set.all().order_by('-date_created')
10+
11
12 class TeamEventComment(models.Model):
13 """
14
15=== modified file 'loco_directory/teams/management/commands/lpupdate.py'
16--- loco_directory/teams/management/commands/lpupdate.py 2013-02-16 18:50:41 +0000
17+++ loco_directory/teams/management/commands/lpupdate.py 2013-08-28 23:23:58 +0000
18@@ -102,7 +102,7 @@
19 if not existing_groups or l.name not in [g.name for g in existing_groups]:
20 group = Group(name=l.name)
21 group.save()
22- approved_entry = filter(lambda a: a.team.name == u"locoteams-approved", l.memberships_details)
23+ approved_entry = filter(lambda a: a.team.name == u"locoteams-verified", l.memberships_details)
24 if approved_entry:
25 team.approved = True
26 if team.approved:
27
28=== modified file 'loco_directory/templates/events/team_event_detail_comments.inc.html'
29--- loco_directory/templates/events/team_event_detail_comments.inc.html 2013-05-20 15:43:03 +0000
30+++ loco_directory/templates/events/team_event_detail_comments.inc.html 2013-08-28 23:23:58 +0000
31@@ -1,12 +1,12 @@
32 {% load i18n %}
33-{% if team_event.teameventcomment_set.all %}
34+{% if team_event.comments_set %}
35
36 <h3 class="comments-nbr">
37-{% blocktrans count team_event.teameventcomment_set.all.count as comment_count %}{{ comment_count }} Comment{% plural %}{{ comment_count }} Comments{% endblocktrans %}
38+{% blocktrans count team_event.comments_set.count as comment_count %}{{ comment_count }} Comment{% plural %}{{ comment_count }} Comments{% endblocktrans %}
39 </h3>
40
41 <ol id="comments" class="comments">
42- {% for comment in team_event.teameventcomment_set.all %}
43+ {% for comment in team_event.comments_set %}
44 <li id="comment-{{ comment.pk }}" class="response">
45 <div class="mugshot">
46 <a href="{% url profile-detail comment.commenter_profile.user.username %}" class="url" title="{{ comment.commenter_profile.user.get_full_name }}">

Subscribers

People subscribed via source and target branches