diff options
author | Parker Berberian <pberberian@iol.unh.edu> | 2018-11-20 11:19:55 -0500 |
---|---|---|
committer | Parker Berberian <pberberian@iol.unh.edu> | 2018-11-26 14:07:15 -0500 |
commit | f2bbdbbf7e03be031723a9680aa9deaf80e4a99c (patch) | |
tree | 54086b0ae60b65da0905e3b51c922934247b5370 /dashboard/src/booking/views.py | |
parent | 674812a20f6804c287e1355ec8a1adf907798a94 (diff) |
Fix all flake8 errors
The flake8 command in test.sh finds no longer finds any errors.
This may form a basis of a jenkins verify job as a sort of 'weak compile-time checks'
The flake8 command will not complain about line length, and will not complain about
django's manage.py file
Change-Id: Ic47cb4fc7ada55e64485661ab6881aef475018ff
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
Diffstat (limited to 'dashboard/src/booking/views.py')
-rw-r--r-- | dashboard/src/booking/views.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/dashboard/src/booking/views.py b/dashboard/src/booking/views.py index a0ea31d..ab43519 100644 --- a/dashboard/src/booking/views.py +++ b/dashboard/src/booking/views.py @@ -11,10 +11,8 @@ from django.contrib import messages from django.shortcuts import get_object_or_404 from django.http import JsonResponse -from django.urls import reverse from django.utils import timezone from django.views import View -from django.views.generic import FormView from django.views.generic import TemplateView from django.shortcuts import redirect, render import json @@ -107,22 +105,24 @@ def booking_detail_view(request, booking_id): allowed_users.add(booking.owner) if user not in allowed_users: return render(request, "dashboard/login.html", {'title': 'This page is private'}) - return render(request, "booking/booking_detail.html", { - 'title': 'Booking Details', - 'booking': booking, - 'pdf': ResourceManager().makePDF(booking.resource), - 'user_id': user.id}) + + return render( + request, + "booking/booking_detail.html", + { + 'title': 'Booking Details', + 'booking': booking, + 'pdf': ResourceManager().makePDF(booking.resource), + 'user_id': user.id + }) def booking_stats_view(request): return render( - request, - "booking/stats.html", - context={ - "data": StatisticsManager.getContinuousBookingTimeSeries(), - "title": "Booking Statistics" - } - ) + request, + "booking/stats.html", + context={"data": StatisticsManager.getContinuousBookingTimeSeries(), "title": "Booking Statistics"} + ) def booking_stats_json(request): |