Skip to content

Commit

Permalink
Fix broken dev Redis default config (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamHawtin authored Feb 12, 2025
1 parent 9968ad3 commit 39038e4
Showing 1 changed file with 6 additions and 6 deletions.
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

0 comments on commit 39038e4

Please sign in to comment.