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

Field editor #12

Open
wants to merge 10 commits into
base: develop
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
2 changes: 1 addition & 1 deletion docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ release: .docker-login ## release version $VERSION
run: ## run image locally
CMD="" $(MAKE) .run

test: ## test docker image
check: ## test docker image
CMD='sh -c "whoami && django-admin collectstatic --no-input -v 3 && django-admin check --deploy"' \
$(MAKE) .run

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ django-filter = "^22.1"
django-front-door = "^0.10.0"
django-debug-toolbar = "^3"
pygments = "^2.14.0"
beautifulsoup4 = "^4.12.0"
soupsieve = "^2.4"
pyquery = "^2.0.0"
beautifulsoup4 = "^4.12.0"

[tool.poetry.dev-dependencies]
black = "^22.1.0"
Expand Down
9 changes: 6 additions & 3 deletions src/aurora/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def parse_emails(value):
"CORS_ALLOWED_ORIGINS": (list, []),
"CSP_REPORT_ONLY": (bool, True),
"CSRF_COOKIE_NAME": (str, "aurora"),
"CSRF_COOKIE_SECURE": (bool, True),
"DEBUG": (bool, False),
"DEBUG_PROPAGATE_EXCEPTIONS": (bool, False),
"DJANGO_ADMIN_TITLE": (str, "Aurora"),
Expand All @@ -77,20 +78,22 @@ def parse_emails(value):
"PRODUCTION_SERVER": (str, ""),
"PRODUCTION_TOKEN": (str, ""),
"REDIS_CONNSTR": (str, ""),
"ROOT_KEY": (str, uuid.uuid4().hex),
"ROOT_TOKEN": (str, uuid.uuid4().hex),
"SECRET_KEY": (str, ""),
"SECURE_HSTS_SECONDS": (int, 0),
"SENTRY_DSN": (str, ""),
"SENTRY_ENVIRONMENT": (str, "production"),
"SENTRY_PROJECT": (str, ""),
"SENTRY_SECURITY_TOKEN": (str, ""),
"SENTRY_SECURITY_TOKEN_HEADER": (str, "X-Sentry-Token"),
"SESSION_COOKIE_DOMAIN": (str, "localhost"),
"SESSION_COOKIE_NAME": (str, "aurora_id"),
"SESSION_COOKIE_SECURE": (bool, "false"),
"SESSION_COOKIE_SECURE": (bool, True),
"SESSION_COOKIE_HTTPONLY": (bool, True),
"SMART_ADMIN_BOOKMARKS": (parse_bookmarks, ""),
"STATICFILES_STORAGE": (str, "aurora.web.storage.ForgivingManifestStaticFilesStorage"),
"USE_HTTPS": (bool, False),
"USE_X_FORWARDED_HOST": (bool, "false"),
"USE_X_FORWARDED_HOST": (bool, True),
"SITE_ID": (int, 1),
# "CSP_DEFAULT_SRC": (list, ),
# "CSP_SCRIPT_SRC": (str, None),
Expand Down
12 changes: 9 additions & 3 deletions src/aurora/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
SESSION_COOKIE_AGE = 60 * 60 * 24 * 7 # 7 days
# SESSION_COOKIE_DOMAIN = env('SESSION_COOKIE_DOMAIN')
SESSION_COOKIE_SAMESITE = "Lax"
SESSION_COOKIE_SECURE = False
SESSION_COOKIE_SECURE = env("SESSION_COOKIE_SECURE")
SESSION_COOKIE_NAME = env("SESSION_COOKIE_NAME")
SESSION_ENGINE = "django.contrib.sessions.backends.signed_cookies"
SESSION_COOKIE_HTTPONLY = True
Expand Down Expand Up @@ -381,7 +381,7 @@

sentry_sdk.init(
dsn=SENTRY_DSN,
environment="production",
environment=env("SENTRY_ENVIRONMENT"),
integrations=[
DjangoIntegration(transaction_style="url"),
sentry_logging,
Expand Down Expand Up @@ -691,7 +691,13 @@ def show_ddt(request): # pragma: no-cover
ADMIN_SYNC_LOCAL_ADMIN_URL = env("ADMIN_SYNC_LOCAL_ADMIN_URL", default="")
# ADMIN_SYNC_USE_REVERSION=

SILENCED_SYSTEM_CHECKS = ["debug_toolbar.W006", "urls.W005", "admin_extra_buttons.PERM"]
SILENCED_SYSTEM_CHECKS = [
"debug_toolbar.W006",
"urls.W005",
"admin_extra_buttons.PERM",
"security.W008", # SECURE_SSL_REDIRECT
"security.W019", # XFrameOptionsMiddleware
]

DBTEMPLATES_USE_REVERSION = True
DBTEMPLATES_USE_CODEMIRROR = True
Expand Down
252 changes: 0 additions & 252 deletions src/aurora/core/admin/field_editor.py

This file was deleted.

Loading