def get(self): next_treat_time = TreatQueue.get_next_treat_time() if next_treat_time: next_treat_time = format_datetime_for_printing(next_treat_time) else: next_treat_time = "No treats scheduled :( Give the next treat!" next_treat_slot = TreatQueue.get_next_open_treat_slot() next_treat_slot = format_datetime_for_printing(next_treat_slot) self.render("templates/index.html", next_treat_time=next_treat_time, next_treat_slot=next_treat_slot)