def fix(): """Handles requests to correct an employee's status, then redirects to their page.""" try: employee = Employee.get(request.query['employee']) except LookupError: return error('No employee was specified') employee.fix() return redirect("/employed?employee=" + employee.name)
def employed(): """Renders a page indicating whether an employee still has a job.""" try: employee = Employee.get(request.query['employee']) except LookupError: return error('No employee was specified') return template( 'employed.html', employee=employee.name, has_a_job=employee.has_a_job, company=getenv("COMPANY_NAME", "My Company"), year=date.today().year, )