b695dd8054
Moved helpers and views to their respective new apps
20 lines
686 B
Python
20 lines
686 B
Python
from django.contrib.admin.views.decorators import staff_member_required
|
|
from django.shortcuts import render
|
|
|
|
from common.documents import render_to_pdf
|
|
from transport.context_busroll import bus_roll_context
|
|
from transport.context_helpers import bus_summary_context, emergency_contacts_context
|
|
|
|
|
|
@staff_member_required
|
|
def bus_summary(request):
|
|
return render(request, 'reports/bus_summary.html', bus_summary_context())
|
|
|
|
@staff_member_required
|
|
def emergency_contacts(request):
|
|
return render_to_pdf('reports/emergency_contacts.html', emergency_contacts_context())
|
|
|
|
|
|
@staff_member_required
|
|
def bus_roll(request):
|
|
return render_to_pdf('reports/bus_roll.html', bus_roll_context()) |