summaryrefslogtreecommitdiffstats
path: root/engagements/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'engagements/views.py')
-rw-r--r--engagements/views.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/engagements/views.py b/engagements/views.py
index 60bec47..86f886d 100644
--- a/engagements/views.py
+++ b/engagements/views.py
@@ -18,6 +18,7 @@ from .forms import (
EngagementStrategyCreateForm,
)
from .models import Engagement, EngagementEffort, EngagementStrategy, EngagementType, Organisation
+from .utils import duration_formatter
def effort_detail(request, effort_id):
@@ -66,6 +67,7 @@ def engagement_detail(request, pk):
effort_total = sum(e.effort_total_hours() for e in effort)
effort_planned = sum(e.effort_total_planned_hours() for e in effort)
effort_actual = sum(e.effort_actual() for e in effort)
+ day_duration_str = duration_formatter(engagement.proposed_start_date, engagement.proposed_end_date)
context = {
"engagement": engagement,
"subinstruments": subinstruments,
@@ -73,6 +75,7 @@ def engagement_detail(request, pk):
"effort_total": effort_total,
"effort_planned": effort_planned,
"effort_actual": effort_actual,
+ "day_duration": day_duration_str,
"dscs": dscs,
}
return render(request, "engagements/engagement_detail.html", context)