Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken dev Redis default config #101

Merged
merged 1 commit into from
Feb 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions cms/settings/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,15 @@
# Allow requests from the local IPs to see more debug information.
INTERNAL_IPS = ("127.0.0.1", "10.0.2.2")


# This is only to test Wagtail emails.
WAGTAILADMIN_BASE_URL = "http://localhost:8000"


# Display sent emails in the console while developing locally.
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"


# Disable password validators when developing locally.
AUTH_PASSWORD_VALIDATORS = []


# Enable Wagtail's style guide in Wagtail's settings menu.
# http://docs.wagtail.io/en/stable/contributing/styleguide.html
INSTALLED_APPS += ["wagtail.contrib.styleguide"] # noqa: F405
Expand All @@ -37,7 +33,6 @@
# For the same reason the HSTS header should not be sent.
SECURE_HSTS_SECONDS = 0


# Adds Django Debug Toolbar
INSTALLED_APPS.append("debug_toolbar")
MIDDLEWARE.insert(0, "debug_toolbar.middleware.DebugToolbarMiddleware") # noqa: F405
Expand All @@ -57,7 +52,12 @@
DATABASES["read_replica"] = copy.deepcopy(DATABASES["default"])

# Redis
REDIS_URL = "redis://localhost:6379"
REDIS_URL = env.get("REDIS_URL", "redis://localhost:6379") # noqa: F405
CACHES["default"] = { # noqa: F405
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": REDIS_URL,
"OPTIONS": {**redis_options}, # noqa: F405
}

# Django Defender
ENABLE_DJANGO_DEFENDER = False
Expand Down
Loading