17 lines
494 B
Python
17 lines
494 B
Python
from __future__ import annotations
|
|
|
|
from django.conf import settings
|
|
from django.core.checks import Warning, register
|
|
|
|
|
|
@register()
|
|
def yksa_settings_declared(app_configs, **kwargs):
|
|
if getattr(settings, "YKSA_SERVICE", None):
|
|
return []
|
|
return [
|
|
Warning(
|
|
"YKSA_SERVICE is not set; cache keys fall back to the 'yksa' namespace.",
|
|
hint="Set YKSA_SERVICE to this service's slug in settings/base.py.",
|
|
id="yksa_kit.W001",
|
|
)
|
|
]
|