summaryrefslogtreecommitdiff
path: root/workshop_app/views.py
diff options
context:
space:
mode:
authorankitjavalkar2019-09-03 17:41:05 +0530
committerankitjavalkar2019-09-03 17:41:05 +0530
commit432998c8df215cf24512bc2e50e47ee6fdf952d0 (patch)
treeab290e8b90e91b8165355e0629c124d2e345d214 /workshop_app/views.py
parent4a8ae597541d744c4e172dfd71b8d0a617c2d1dd (diff)
downloadworkshop_booking-432998c8df215cf24512bc2e50e47ee6fdf952d0.tar.gz
workshop_booking-432998c8df215cf24512bc2e50e47ee6fdf952d0.tar.bz2
workshop_booking-432998c8df215cf24512bc2e50e47ee6fdf952d0.zip
Temporary Fix: Remove Pagination from my_workshops.html and related views
Diffstat (limited to 'workshop_app/views.py')
-rw-r--r--workshop_app/views.py27
1 files changed, 2 insertions, 25 deletions
diff --git a/workshop_app/views.py b/workshop_app/views.py
index 961445a..bdb5580 100644
--- a/workshop_app/views.py
+++ b/workshop_app/views.py
@@ -676,20 +676,8 @@ def my_workshops(request):
for p in proposed_workshop_pending:
workshops.append(p)
-
- #Show upto 12 Workshops per page
- paginator = Paginator(workshops, 12)
- page = request.GET.get('page')
- try:
- workshop_occurences = paginator.page(page)
- except PageNotAnInteger:
- #If page is not an integer, deliver first page.
- workshop_occurences = paginator.page(1)
- except EmptyPage:
- #If page is out of range(e.g 999999), deliver last page.
- workshop_occurences = paginator.page(paginator.num_pages)
return render(request, 'workshop_app/my_workshops.html',
- { "workshop_occurences" :workshop_occurences,
+ { "workshops" :workshops,
"today": today})
else:
@@ -706,19 +694,8 @@ def my_workshops(request):
for p in proposed_workshop:
workshops.append(p)
- #Show upto 12 Workshops per page
- paginator = Paginator(workshops, 12)
- page = request.GET.get('page')
- try:
- workshop_occurences = paginator.page(page)
- except PageNotAnInteger:
- #If page is not an integer, deliver first page.
- workshop_occurences = paginator.page(1)
- except EmptyPage:
- #If page is out of range(e.g 999999), deliver last page.
- workshop_occurences = paginator.page(paginator.num_pages)
return render(request, 'workshop_app/my_workshops.html',
- {"workshop_occurences": workshop_occurences})
+ {"workshops": workshops})
else:
return redirect('/login/')