Implement templating to avoid copy/paste HTML code. #7

This commit is contained in:
Ian Renton
2025-10-02 11:16:38 +01:00
parent 10f8d9b4ed
commit cc1a7a9b8c
17 changed files with 105 additions and 117 deletions

View File

@@ -17,7 +17,7 @@ from core.utils import infer_mode_type_from_mode, infer_band_from_freq, infer_co
@dataclass
class Spot:
# Globally unique identifier for the spot
guid: str = str(uuid.uuid4())
guid: str = None
# Callsign of the operator that has been spotted
dx_call: str = None
# Callsign of the operator that has spotted them
@@ -91,6 +91,9 @@ class Spot:
# Infer missing parameters where possible
def infer_missing(self):
# Always create a GUID
self.guid = str(uuid.uuid4())
# Clean up DX call if it has an SSID or -# from RBN
if self.dx_call and "-" in self.dx_call:
self.dx_call = self.dx_call.split("-")[0]