Code reference › models › common

class

GlobalSettings

pretalx.common.models.settings.GlobalSettings source

InheritsGlobalSettingsBase
Inherited attributes 1
pk'_global'GlobalSettingsBase

Properties 1

Added at runtime

Added by Django or another library dynamically after class creation.
settings

Methods 1

Defined here

get_instance_identifier()source
def get_instance_identifier(self):
    global INSTANCE_IDENTIFIER  # noqa: PLW0603 -- module-level cache for instance identifier

    if INSTANCE_IDENTIFIER:
        return INSTANCE_IDENTIFIER

    try:
        INSTANCE_IDENTIFIER = uuid.UUID(self.settings.get("instance_identifier"))
    except (TypeError, ValueError):
        INSTANCE_IDENTIFIER = uuid.uuid4()
        self.settings.set("instance_identifier", str(INSTANCE_IDENTIFIER))
    return INSTANCE_IDENTIFIER