Added confirmation_letter template. Still WIP and needs to be replaced with something more dynamic.

This commit is contained in:
John Mullins
2023-11-20 14:35:26 +11:00
parent e56fdc8d3c
commit 0dea60d29e
3 changed files with 54 additions and 0 deletions
+3
View File
@@ -75,6 +75,9 @@ class SchoolRollMixin:
class TravellerRollMixin:
def confirmation_letter(self, request, queryset):
return render_to_pdf('mail/confirmation_letter.html', confirmation_letter_context(queryset))
def send_sms(self, request, queryset):
if 'send' in request.POST:
message = request.POST["message"]
+10
View File
@@ -237,3 +237,13 @@ def bus_summary_context():
return {'routes': bus_routes}
def confirmation_letter_context(queryset):
travellers = []
for traveller in queryset:
for travellerRoute in TravellerRoute.objects.filter(traveller=traveller):
travellers.append({
'traveller': traveller,
'stop': travellerRoute.busStop,
'shuttle': traveller.shuttle,
})
return {'travellers': travellers}
@@ -0,0 +1,41 @@
<style>
h1 {
text-align: center;
font-size: 270%;
margin: 80px;
}
p {
font-size: 170%;
margin: 40px;
}
</style>
{% for traveller in travellers %}
<h1>ECHUCA COUNTRY SCHOOL BUS NETWORK CONFIRMATION OF SEAT AVAILABILITY 2024</h1>
<p><b>Student Name:</b> {{ traveller.traveller }}<br>
<b>School:</b> {{ traveller.traveller.school }}<br>
<b>Route Name:</b> {{ traveller.stop.bus }}<br>
<b>Stop Name:</b> {{ traveller.stop.address }}<br>
<b>Pickup Time:</b> {{ traveller.stop.am_time }}<br>
<b>Dropoff Time:</b> {{ traveller.stop.pm_time }}<br>
{% if traveller.traveller.shuttle %}
<b>Shuttle:</b> {{ traveller.shuttle.bus }}<br>
{% endif %}
<b>Fee Paying Status:</b> {{ traveller.traveller.get_eligibility_status_display }}</p>
<p>We wish to advise a seat is available for travel in 2024. If your child is a fare paying student seats cannot be guaranteed as per the Department of Education School Bus Policy.</p>
{% if traveller.traveller.shuttle %}
<p>After arriving at Echuca College, {{ traveller.traveller.first_name }} will transfer to the <b>{{ traveller.shuttle.bus }}</b> shuttle for travel to {{ traveller.shuttle.school }} and in reverse for the afternoon service.</p>
{% endif %}
<p>It is advisable that the student is at the bus stop 10 minutes prior to the nominated departure time.</p>
<p>It is essential that parents of junior students are present at the bus stop to collect students in the afternoon, as a bus driver will not leave a student at an unattended stop if he/she has any concern re student safety.</p>
<p><b><u>TRAVEL IS AVAILABLE FOR ORIENTATION DAY 2023 UNDER THESE ARRANGEMENTS</u></b></p>
<p>Any queries please contact Nicole Edwards on 5482 1133</p>
<p style="page-break-after: always">
{% endfor %}