def home(request): """Entry page.""" schedule = Schedule(request) if schedule.during_elections(): # During the election period the front page will redirect to the # authentication page. return HTTPFound(location=route_url('login', request)) elif schedule.after_elections(): # After the elections the front page will redirect to the results page. return HTTPFound(location=route_url('results', request)) return { 'browse_url': route_url('browse_candidates', request) }