Skip to content

Commit e478654

Browse files
committed
Convert defaultdict to dict before passing to template
1 parent e51f2f9 commit e478654

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

junction/proposals/dashboard.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,7 @@ def proposal_state(request, conference_slug):
341341

342342
state = request.GET.get('q', 'unreviewed')
343343
proposals = services.group_proposals_by_reveiew_state(conf=conf, state=state)
344-
345344
return render(request, 'proposals/review_state.html',
346345
{'conference': conf,
347-
'proposals': proposals,
346+
'proposals': dict(proposals),
348347
'state': state.title()})

junction/templates/proposals/dashboard.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,17 @@
8888
<tr>
8989
<th>Type Name</th>
9090
<th>Total</th>
91-
<th><a href="{% url 'proposal-state' conference.slug%}?q='reviewed' %}">
92-
Reviewed</a></th>
93-
<th><a href="{% url 'proposal-state' conference.slug%}?q='unreviewed' %}">
94-
UnReviewed</a></th>
91+
<th>Reviewed</th>
92+
<th>UnReviewed</th>
9593
</tr>
9694
{% for group,count in group_by_type.items %}
9795
<tr>
9896
<td>{{count.3}}</td>
9997
<td><a href="{% url 'proposals-list' conference.slug%}?proposal_type={{group}}"> {{count.0}}</a></td>
100-
<td>{{count.1}}</td>
101-
<td>{{count.2}}</td>
98+
<td><a href="{% url 'proposal-state' conference.slug%}?q=reviewed">
99+
{{count.1}}</a></td>
100+
<td><a href="{% url 'proposal-state' conference.slug%}?q=unreviewed">
101+
{{count.2}}</a></td>
102102
</tr>
103103
{% endfor %}
104104
</table>

junction/templates/proposals/review_state.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,14 @@
5858
<div class="panel-heading"> {{ state }} proposals</div>
5959
<div class="panel-body">
6060
{% for section, proposal_list in proposals.items %}
61-
<h2 class="section-title">{{ section }}</h2>
61+
<h3 class="section-title">{{ section }}</h3>
6262
{% for proposal in proposal_list %}
63-
<h3 class="proposal--title">
63+
<h4 class="proposal--title">
6464
<a href='{{ proposal.get_absolute_url }}'>{{ forloop.counter}}. {{ proposal.title|capfirst }}</a>
6565
- {{ proposal.proposal_type }}
66-
</h3>
66+
</h4>
6767
{% endfor %}
68+
<hr>
6869
{% endfor %}
6970
</div>
7071
</div>

0 commit comments

Comments
 (0)