Add redis (live layers)

Add base for geo_api (WIP)
This commit is contained in:
phil 2023-12-16 00:49:01 +05:30
parent 049b8c9927
commit 4048e61221
11 changed files with 694 additions and 55 deletions

View file

@ -305,7 +305,7 @@ class GeoModel(Model):
It can be overridden with the with_related parameter when calling get_df.
"""
z_index: ClassVar[int] = 450
z_index: ClassVar[int] = 450 # Field(450, alias='zIndex')
"""
z-index for the leaflet layer.
Should be between 400 and 500.
@ -742,6 +742,13 @@ class GeoModel(Model):
def get_attachment_base_dir(cls):
return Path(conf.attachments['base_dir'])/cls.get_attachment_dir()
class LiveGeoModel(GeoModel):
store: ClassVar[str]
group: ClassVar[str] ='Live'
custom: ClassVar[bool] = True
is_live: ClassVar[bool] = True
is_db: ClassVar[bool] = False
class Geom(str):
pass