aboutsummaryrefslogtreecommitdiff
path: root/app/dispatch
diff options
context:
space:
mode:
Diffstat (limited to 'app/dispatch')
-rw-r--r--app/dispatch/templates/dispatch/drivers/detail.html1
-rw-r--r--app/dispatch/views.py12
2 files changed, 13 insertions, 0 deletions
diff --git a/app/dispatch/templates/dispatch/drivers/detail.html b/app/dispatch/templates/dispatch/drivers/detail.html
index 97d6ff4..24afcc1 100644
--- a/app/dispatch/templates/dispatch/drivers/detail.html
+++ b/app/dispatch/templates/dispatch/drivers/detail.html
@@ -19,6 +19,7 @@
</div>
</div>
+
{% load dynamic_key %}
{% for date in loads %}
<div class="row">
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