def whereabouts(): dates = [] today = datetime.datetime.today() monday = today - datetime.timedelta(int(today.strftime("%w"))) for i in range(35): day = monday + datetime.timedelta(i) if day.strftime("%a") != "Sat" and day.strftime("%a") != "Sun": dates.append(day) date_from = str(dates[0].strftime("%Y-%m-%d")) # database doesn't return final date date_to = dates[-1] + datetime.timedelta(1) date_to = str(date_to.strftime("%Y-%m-%d")) table_date_headings = get_date_headings(today, dates) table_data = generate_table_data(date_from, date_to) return lifeguard_render( "whereabouts.html", title="Whereabouts", table_date_headings=table_date_headings, table_data=table_data, image="/static/images/whereabouts.png", )
def kit_status(): clearwater_form = ClearwaterKitBookingForm() perimeta_form = PerimetaKitBookingForm() volte_form = VolteKitBookingForm() ccf_form = CCFKitBookingForm() bookings = get_kit_bookings() cc_deployment_names = sorted(bookings["clearwater"].keys()) vt_deployment_names = sorted(bookings["volte"].keys()) ccf_deployment_names = sorted(bookings["ccf"].keys()) return lifeguard_render( "kit_management.html", title="Kit Management", clearwater_form=clearwater_form, perimeta_form=perimeta_form, volte_form=volte_form, ccf_form=ccf_form, bookings=bookings, vt_deployment_names=vt_deployment_names, cc_deployment_names=cc_deployment_names, ccf_deployment_names=ccf_deployment_names, )
def perimeta_control(): # Clever Python stuff goes here return lifeguard_render("perimeta_control.html")
def index(): return lifeguard_render(homepage(), title="Home")
def lifeguards(): return lifeguard_render('lifeguards.html', title='Lifeguards')