On regénère le cache du css qu'une seule fois par jour

This commit is contained in:
Jean-Marie Favreau 2024-11-24 11:55:37 +01:00
parent 98092de1f0
commit 5a2dea6989
2 changed files with 3 additions and 2 deletions

View File

@ -14,7 +14,8 @@ APP_ENV = os_getenv("APP_ENV", "dev")
DEBUG = os_getenv("DEBUG", "true").lower() in ["True", "true", "1", "yes", "y"] DEBUG = os_getenv("DEBUG", "true").lower() in ["True", "true", "1", "yes", "y"]
ALLOWED_HOSTS = os_getenv("ALLOWED_HOSTS", "localhost").split(",") ALLOWED_HOSTS = os_getenv("ALLOWED_HOSTS", "localhost").split(",")
if DEBUG:
ALLOWED_HOSTS = ALLOWED_HOSTS + ['testserver']
if DEBUG: if DEBUG:
CSRF_TRUSTED_ORIGINS = os_getenv("CSRF_TRUSTED_ORIGINS", "http://localhost").split( CSRF_TRUSTED_ORIGINS = os_getenv("CSRF_TRUSTED_ORIGINS", "http://localhost").split(

View File

@ -123,7 +123,7 @@ def css_categories():
result += "}" result += "}"
result += "</style>" result += "</style>"
cache.set('css_categories', result, 3600) # 1 hour cache.set('css_categories', result, 86400) # 1 day
return mark_safe(result) return mark_safe(result)