mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-02-04 01:04:33 +00:00
15 lines
501 B
Python
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)
|