aboutsummaryrefslogtreecommitdiff
path: root/app/dispatch/views.py
diff options
context:
space:
mode:
authorMitch Riedstra <Mitch@riedstra.us>2017-10-10 14:54:38 -0400
committerMitch Riedstra <Mitch@riedstra.us>2017-10-10 14:54:38 -0400
commit926acc9648b8d6093caf16a9624fd9e3e25e3e50 (patch)
tree04abcbea9b6fef175de73dee926f76026f73291d /app/dispatch/views.py
parentc35399d201d8f64b54d00125cb658082dfee094b (diff)
downloaddispatch-tracker-926acc9648b8d6093caf16a9624fd9e3e25e3e50.tar.gz
dispatch-tracker-926acc9648b8d6093caf16a9624fd9e3e25e3e50.tar.xz
Initial version of extending context for driver view
Diffstat (limited to 'app/dispatch/views.py')
-rw-r--r--app/dispatch/views.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/dispatch/views.py b/app/dispatch/views.py
index 6ce552b..ea03355 100644
--- a/app/dispatch/views.py
+++ b/app/dispatch/views.py
@@ -99,6 +99,18 @@ class DriverDetail(LoadDateSort):
def test_func(self):
return self.request.user.is_superuser
+ def get_context_data(self, **kwargs):
+ # Shit gets fucky with super() really fast, but this seems to work
+ context = super(DriverDetail, self).get_context_data(**kwargs)
+
+ loads_by_date = context['loads']
+ for d in loads_by_date:
+ print(d)
+ for l in d:
+ print(l)
+
+ return context
+
class DriverUpdate(UpdateView):
template_name = "dispatch/drivers/edit.html"
model = User