Files
spothole/server/handlers/pagetemplate.py
2025-12-23 11:51:00 +00:00

15 lines
501 B
Python

import tornado
from core.config import ALLOW_SPOTTING
from core.constants import SOFTWARE_VERSION
# Handler for all HTML pages generated from templates
class PageTemplateHandler(tornado.web.RequestHandler):
def initialize(self, template_name):
self.template_name = template_name
def get(self):
# Load named template, and provide variables used in templates
self.render(self.template_name + ".html", software_version=SOFTWARE_VERSION, allow_spotting=ALLOW_SPOTTING)