Initial commit
This commit is contained in:
commit
5cda7bc309
28 changed files with 1173 additions and 0 deletions
17
yksa_kit/checks.py
Normal file
17
yksa_kit/checks.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
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",
|
||||
)
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue