enabled redis alongside celery, but waiting on true caching functionality—flash messages will behave better w. cache_page after they rely on htmx library, not current full-page reload
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
from django.http import HttpResponseForbidden
|
||||
from django.shortcuts import redirect, render
|
||||
|
||||
from .forms import ExistingListItemForm, ItemForm
|
||||
from .models import Item, List
|
||||
from apps.lyric.models import User
|
||||
|
||||
|
||||
def home_page(request):
|
||||
return render(request, "apps/dashboard/home.html", {"form": ItemForm()})
|
||||
|
||||
|
||||
@@ -109,8 +109,17 @@ else:
|
||||
}
|
||||
}
|
||||
|
||||
# Celery
|
||||
# Celery & Redis
|
||||
CELERY_BROKER_URL = os.environ.get('CELERY_BROKER_URL', 'redis://localhost:6379/0')
|
||||
REDIS_URL = os.environ.get('REDIS_URL')
|
||||
if REDIS_URL:
|
||||
CACHES = {
|
||||
'default': {
|
||||
'BACKEND': 'django.core.cache.backends.redis.RedisCache',
|
||||
'LOCATION': REDIS_URL,
|
||||
}
|
||||
}
|
||||
SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/6.0/ref/settings/#auth-password-validators
|
||||
|
||||
Reference in New Issue
Block a user