On regénère le cache du css qu'une seule fois par jour
This commit is contained in:
@@ -14,7 +14,8 @@ APP_ENV = os_getenv("APP_ENV", "dev")
|
||||
DEBUG = os_getenv("DEBUG", "true").lower() in ["True", "true", "1", "yes", "y"]
|
||||
|
||||
ALLOWED_HOSTS = os_getenv("ALLOWED_HOSTS", "localhost").split(",")
|
||||
|
||||
if DEBUG:
|
||||
ALLOWED_HOSTS = ALLOWED_HOSTS + ['testserver']
|
||||
|
||||
if DEBUG:
|
||||
CSRF_TRUSTED_ORIGINS = os_getenv("CSRF_TRUSTED_ORIGINS", "http://localhost").split(
|
||||
|
@@ -123,7 +123,7 @@ def css_categories():
|
||||
result += "}"
|
||||
|
||||
result += "</style>"
|
||||
cache.set('css_categories', result, 3600) # 1 hour
|
||||
cache.set('css_categories', result, 86400) # 1 day
|
||||
return mark_safe(result)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user