-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
featureA new feature to be added to the codebaseA new feature to be added to the codebase
Milestone
Description
The current generation of the UUID for the Layers is based on those two lines:
instance.uuid = str(uuid.uuid1()) in geonode/geonode/layers/models.py
layer_uuid = str(uuid.uuid1()) in geonode/geonode/upload/upload.py
We want to let the UUID creation be pluggable and let the user use his own UUID generator based on their needs.
if hasattr(settings, 'LAYER_UUID_HANDLER') and settings.LAYER_UUID_HANDLER != '':
from geonode.layers.utils import get_uuid_handler
instance.uuid = get_uuid_handler()(instance).create_uuid()
And is enough to add this config in settings.py by specifying the object that is responsible to manage the new UUID
LAYER_UUID_HANDLER = "mymodule.myfile.MyObject"
More information related to the configuration are available in this PR
Documentation PR at this link
Metadata
Metadata
Assignees
Labels
featureA new feature to be added to the codebaseA new feature to be added to the codebase