Skip to content

Commit

Permalink
remove some dead code from settings
Browse files Browse the repository at this point in the history
  • Loading branch information
fgregg committed Jan 9, 2024
1 parent f6723bb commit a8df80a
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions chicago/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import socket
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration

Expand All @@ -26,12 +25,6 @@
ALLOWED_HOSTS = allowed_hosts.split(",") if allowed_hosts else []
GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY", "")

if DEBUG:
# Add dynamically generated Docker IP
# Don't do this in production!
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
INTERNAL_IPS = [ip[:-1] + "1" for ip in ips] + ["127.0.0.1"]

# Configure Sentry for error logging
if os.getenv("SENTRY_DSN"):
sentry_sdk.init(
Expand Down Expand Up @@ -93,11 +86,6 @@
"opencivicdata.legislative",
)

try:
INSTALLED_APPS += EXTRA_APPS
except NameError:
pass

MIDDLEWARE = (
"django.middleware.security.SecurityMiddleware",
"whitenoise.middleware.WhiteNoiseMiddleware",
Expand Down Expand Up @@ -176,16 +164,6 @@
}


RQ_QUEUES = {
"default": {
"HOST": "localhost",
"PORT": 6379,
"DB": 1,
"PASSWORD": "",
"DEFAULT_TIMEOUT": 360,
}
}

# Enforce SSL in production
if DEBUG is False:
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
Expand Down

0 comments on commit a8df80a

Please sign in to comment.