mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-21 23:42:14 +00:00
Initial work on productions dashboard
This commit is contained in:
@@ -4,3 +4,4 @@ from .hs import *
|
||||
from .ical import *
|
||||
from .rigboard import *
|
||||
from .subhire import *
|
||||
from .dashboards import *
|
||||
14
RIGS/views/dashboards.py
Normal file
14
RIGS/views/dashboards.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from django.views import generic
|
||||
from RIGS import models
|
||||
|
||||
|
||||
class ProductionsDashboard(generic.TemplateView):
|
||||
template_name = 'dashboards/productions.html'
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
context['page_title'] = "Productions Dashboard"
|
||||
context['rig_count'] = models.Event.objects.rig_count()
|
||||
context['subhire_count'] = models.Subhire.objects.event_count()
|
||||
context['hire_count'] = models.Event.objects.active_dry_hires().count()
|
||||
return context
|
||||
Reference in New Issue
Block a user