aboutsummaryrefslogtreecommitdiffstats
path: root/src/account
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2019-01-15 12:49:20 -0500
committerParker Berberian <pberberian@iol.unh.edu>2019-01-18 12:15:45 -0500
commiteae6892642b35ed0459e8cc86328c63cf5e87641 (patch)
tree3aca44950597e00d4cf33d59c8b727eed4a1212e /src/account
parent77b6cd08bf94ab330d770f2b7d05e76de12c4cca (diff)
Allow for Hosts to be Re-Imaged
This change adds a button the user can press on thier booking detail page to reset thier host. They can choose to deploy any available image to thier servers (not just the one already used) Change-Id: I97a9869d2b38389c54f13173bb28a68cc52bb8d5 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
Diffstat (limited to 'src/account')
-rw-r--r--src/account/views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/account/views.py b/src/account/views.py
index 09c5266..e880208 100644
--- a/src/account/views.py
+++ b/src/account/views.py
@@ -181,8 +181,8 @@ def account_booking_view(request):
if not request.user.is_authenticated:
return render(request, "dashboard/login.html", {'title': 'Authentication Required'})
template = "account/booking_list.html"
- bookings = list(Booking.objects.filter(owner=request.user))
- collab_bookings = list(request.user.collaborators.all())
+ bookings = list(Booking.objects.filter(owner=request.user).order_by("-start"))
+ collab_bookings = list(request.user.collaborators.all().order_by("-start"))
context = {"title": "My Bookings", "bookings": bookings, "collab_bookings": collab_bookings}
return render(request, template, context=context)