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

Clean duplicate settings from settings/docker.py #1911

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions djangoproject/settings/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,6 @@
)

SILENCED_SYSTEM_CHECKS = SILENCED_SYSTEM_CHECKS + [
# Default test keys for development.
"django_recaptcha.recaptcha_test_key_error"
]
57 changes: 1 addition & 56 deletions djangoproject/settings/docker.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .common import * # noqa
from .dev import * # noqa: F403

DATABASES = {
"default": {
Expand All @@ -13,64 +13,9 @@

SECRET_KEY = os.environ.get("SECRET_KEY")

SILENCED_SYSTEM_CHECKS = SILENCED_SYSTEM_CHECKS + [
"django_recaptcha.recaptcha_test_key_error" # Default test keys for development.
]

ALLOWED_HOSTS = [".localhost", "127.0.0.1", "www.127.0.0.1"]

LOCALE_MIDDLEWARE_EXCLUDED_HOSTS = ["docs.djangoproject.localhost"]

DEBUG = True
THUMBNAIL_DEBUG = DEBUG

CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache",
"LOCATION": "trololololol",
},
"docs-pages": {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache",
"LOCATION": "docs-pages",
},
}

CSRF_COOKIE_SECURE = False

EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"

MEDIA_ROOT = str(DATA_DIR.joinpath("media_root"))

SESSION_COOKIE_SECURE = False

STATIC_ROOT = str(DATA_DIR.joinpath("static_root"))

# Docs settings
DOCS_BUILD_ROOT = DATA_DIR.joinpath("djangodocs")

# django-hosts settings

PARENT_HOST = "localhost:8000"

# django-push settings

PUSH_SSL_CALLBACK = False

# Enable optional components

if DEBUG:
try:
import debug_toolbar # NOQA
except ImportError:
pass
else:
INSTALLED_APPS.append("debug_toolbar")
INTERNAL_IPS = ["127.0.0.1"]
MIDDLEWARE.insert(
MIDDLEWARE.index("django.middleware.common.CommonMiddleware") + 1,
"debug_toolbar.middleware.DebugToolbarMiddleware",
)
MIDDLEWARE.insert(
MIDDLEWARE.index("debug_toolbar.middleware.DebugToolbarMiddleware") + 1,
"djangoproject.middleware.CORSMiddleware",
)