mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-28 18:22:05 +00:00
Replace pages' use of the options call with directly building the HTML components using templates, as the syntax is much nicer. Use a common set of data provided to all modules via pagetemplate.py instead of passing things like web_ui_options around. Closes #153
This commit is contained in:
+3
-15
@@ -161,11 +161,7 @@ class WebServer:
|
||||
APIDxStatsHandler,
|
||||
{"spots": self._data_store.spots},
|
||||
),
|
||||
(
|
||||
r"/api/v3/options",
|
||||
APIOptionsHandler,
|
||||
{"status_data": self._data_store.status.get()},
|
||||
),
|
||||
(r"/api/v3/options", APIOptionsHandler),
|
||||
(
|
||||
r"/api/v3/status",
|
||||
APIStatusHandler,
|
||||
@@ -216,11 +212,7 @@ class WebServer:
|
||||
V2APIDxStatsHandler,
|
||||
{"spots": self._data_store.spots},
|
||||
),
|
||||
(
|
||||
r"/api/v2/options",
|
||||
V2APIOptionsHandler,
|
||||
{"status_data": self._data_store.status.get()},
|
||||
),
|
||||
(r"/api/v2/options", V2APIOptionsHandler),
|
||||
(
|
||||
r"/api/v2/status",
|
||||
V2APIStatusHandler,
|
||||
@@ -271,11 +263,7 @@ class WebServer:
|
||||
V1APIDxStatsHandler,
|
||||
{"spots": self._data_store.spots},
|
||||
),
|
||||
(
|
||||
r"/api/v1/options",
|
||||
V1APIOptionsHandler,
|
||||
{"status_data": self._data_store.status.get()},
|
||||
),
|
||||
(r"/api/v1/options", V1APIOptionsHandler),
|
||||
(
|
||||
r"/api/v1/status",
|
||||
V1APIStatusHandler,
|
||||
|
||||
Reference in New Issue
Block a user