Split up some code for sanity #3

This commit is contained in:
Ian Renton
2025-12-23 11:51:00 +00:00
parent fd246fc17b
commit 61784e8af6
12 changed files with 341 additions and 242 deletions

View File

@@ -0,0 +1,14 @@
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)