Browse Source

Template cleanup

Sebastian Lohff 2 years ago
parent
commit
0c69ee13b1

+ 2
- 2
contest/views.py View File

@@ -162,7 +162,7 @@ def viewUserQSOs(request, uid, page=1):
162 162
 
163 163
 	userRefs = set(map(lambda _x: _x["refStr"], user.qso_set.filter(ref__isnull=False).values("ref", "refStr")))
164 164
 
165
-	return render(request, "contest/viewUserQSOs.html", {'owner': user, 'qsos': qsos, 'qsoPager': qsoPager, 'qsoPage': qsoPage, 'userRefs': userRefs})
165
+	return render(request, "contest/viewUserQSOs.html", {'owner': user, 'qsos': qsos, 'qsoPage': qsoPage, 'userRefs': userRefs})
166 166
 
167 167
 @staff_member_required
168 168
 def updateRef(request, shadow, uid):
@@ -214,7 +214,7 @@ def viewAllQSOs(request, page=1):
214 214
 	qsoPager = Paginator(qsos, 10)
215 215
 	qsoPage = getPage(qsoPager, request.GET.get('page'))
216 216
 
217
-	return render(request, 'contest/viewAllQSOs.html', {'qsoPager': qsoPager, 'qsoPage': qsoPage})
217
+	return render(request, 'contest/viewAllQSOs.html', {'qsoPage': qsoPage})
218 218
 
219 219
 def overview(request):
220 220
 	# FIXME: Hardcoded for cqtu... everywhere

+ 1
- 1
templates/contest/paginationNav.html View File

@@ -5,7 +5,7 @@
5 5
         <span aria-hidden="true">&laquo;</span>
6 6
       </a>
7 7
     </li>
8
-	{% for pageNo in pages.page_range %}
8
+	{% for pageNo in page.paginator.page_range %}
9 9
     <li{% if pageNo == page.number %} class="active"{% endif %}><a href="?page={{ pageNo }}" pageNo %}">{{ pageNo }}</a></li>
10 10
 	{% endfor %}
11 11
     <li class="{% if not page.has_next %}disabled{% endif %}">

+ 2
- 2
templates/contest/qsoAdminTable.html View File

@@ -1,4 +1,4 @@
1
-{% include "contest/paginationNav.html" with page=qsoPage pages=qsoPager %}
1
+{% include "contest/paginationNav.html" with page=qsoPage %}
2 2
 <table class="table">
3 3
 	<thead>
4 4
 		<tr>
@@ -36,4 +36,4 @@
36 36
 {% endfor %}
37 37
 	</tbody>
38 38
 </table>
39
-{% include "contest/paginationNav.html" with page=qsoPage pages=qsoPager %}
39
+{% include "contest/paginationNav.html" with page=qsoPage %}

+ 1
- 1
templates/contest/viewAllQSOs.html View File

@@ -8,7 +8,7 @@
8 8
 		<div class="panel panel-default">
9 9
 			<div class="panel-heading">All QSOs</div>
10 10
 			<div class="panel-body">
11
-			{% include "contest/qsoAdminTable.html" with qsoPage=qsoPage qsoPager=qsoPager %}
11
+			{% include "contest/qsoAdminTable.html" with qsoPage=qsoPage %}
12 12
 			</div>
13 13
 		</div>
14 14
 	</div>

Loading…
Cancel
Save