Provide today's date as context for profile view

This commit is contained in:
Lance Edgar 2019-08-11 17:30:08 -05:00
parent b0af78f3b2
commit a49d107a82

View file

@ -31,6 +31,7 @@ import sqlalchemy as sa
from sqlalchemy import orm from sqlalchemy import orm
from rattail.db import model, api from rattail.db import model, api
from rattail.time import localtime
import colander import colander
from pyramid.httpexceptions import HTTPFound, HTTPNotFound from pyramid.httpexceptions import HTTPFound, HTTPNotFound
@ -246,6 +247,7 @@ class PeopleView(MasterView):
'person': person, 'person': person,
'instance': person, 'instance': person,
'instance_title': self.get_instance_title(person), 'instance_title': self.get_instance_title(person),
'today': localtime(self.rattail_config).date(),
'employee': employee, 'employee': employee,
'employee_view_url': self.request.route_url('employees.view', uuid=employee.uuid) if employee else None, 'employee_view_url': self.request.route_url('employees.view', uuid=employee.uuid) if employee else None,
'employee_history': employee.get_current_history() if employee else None, 'employee_history': employee.get_current_history() if employee else None,