Skip to content
Snippets Groups Projects
Commit c3c54d42 authored by Jan Mach's avatar Jan Mach
Browse files

Added current datetime timestamp to global Jinja template variables.

This timestamp more or less represents the generation time of the page and may serve as common baseline for multiple time operations. (Redmine issue: #3734)
parent b6b9be8d
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,7 @@ __credits__ = "Pavel Kácha <pavel.kacha@cesnet.cz>, Andrea Kropáčová <andrea
import sys
import collections
import traceback
import datetime
#
# Flask related modules.
......@@ -199,6 +200,7 @@ class HawatBaseView(flask.views.View):
def get_template_context(self):
return {
'current_datetime_utc': datetime.datetime.utcnow(),
'hawat_view_title': self.get_view_title()
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment