From 3dde14614f3b698bfcab59b22fd3791b2ba7ac95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=AD=C3=B0ir=20Valberg=20Gu=C3=B0mundsson?= Date: Tue, 9 Aug 2022 19:29:42 +0200 Subject: [PATCH] Fixes and cleanup. --- Makefile | 8 +------- env | 2 +- poetry.lock | 8 ++++---- pyproject.toml | 2 +- src/project/settings.py | 4 +++- src/project/urls.py | 3 +-- 6 files changed, 11 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 77e3102..3624bde 100644 --- a/Makefile +++ b/Makefile @@ -35,11 +35,5 @@ poetry_lock: poetry_command: ${DOCKER_RUN} ${DOCKER_CONTAINER_NAME} poetry ${COMMAND} -build_dev_docker_image: +build_docker_image: ${DOCKER_COMPOSE} build ${DOCKER_CONTAINER_NAME} - -tailwind_install: - ${MANAGE_COMMAND} tailwind install --no-input - -tailwind_build: - ${MANAGE_COMMAND} tailwind build --no-input diff --git a/env b/env index 19c8a09..86933bf 100644 --- a/env +++ b/env @@ -4,4 +4,4 @@ POSTGRES_PASSWORD=postgres POSTGRES_PORT=5432 DATABASE_URL=postgres://postgres:postgres@postgres:5432/postgres DEBUG=True -DJANGO_ENV=all +DJANGO_ENV=development diff --git a/poetry.lock b/poetry.lock index ce13a82..83477ed 100644 --- a/poetry.lock +++ b/poetry.lock @@ -162,14 +162,14 @@ python-versions = "*" [[package]] name = "django-debug-toolbar" -version = "3.2" +version = "3.5.0" description = "A configurable set of panels that display various debug information about the current request/response." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] -Django = ">=2.2" +Django = ">=3.2" sqlparse = ">=0.2.0" [[package]] @@ -503,7 +503,7 @@ brotli = ["brotli"] [metadata] lock-version = "1.1" python-versions = "^3.10" -content-hash = "b9c94675105cfb9daa966cd4b3de9971cdbc6480c833aa7176514fd6ea67a70c" +content-hash = "36626d533a72d4a8597cc1109cf41e383ef0f3663e36770cfe00feac0679ac7d" [metadata.files] asgiref = [] diff --git a/pyproject.toml b/pyproject.toml index 205bd72..4671e3c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ whitenoise = "^5.2" [tool.poetry.dev-dependencies] pytest = "^5.1" pytest-django = "^3.5" -django-debug-toolbar = "^3.2" +django-debug-toolbar = "^3.5" [build-system] requires = ["poetry>=0.12"] diff --git a/src/project/settings.py b/src/project/settings.py index f5b9cea..d6a0f96 100644 --- a/src/project/settings.py +++ b/src/project/settings.py @@ -16,7 +16,9 @@ SECRET_KEY = env.str("SECRET_KEY", default="something-very-secret") DEBUG = env.bool("DEBUG", default=False) ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=["*"]) -CSRF_TRUSTED_ORIGINS = env.list("CSRF_TRUSTED_ORIGINS", default=["*"]) +CSRF_TRUSTED_ORIGINS = env.list( + "CSRF_TRUSTED_ORIGINS", default=["http://localhost:8000"] +) ADMINS = [tuple(x.split(":")) for x in env.list("DJANGO_ADMINS", default=[])] diff --git a/src/project/urls.py b/src/project/urls.py index 0f3cb57..5771f7c 100644 --- a/src/project/urls.py +++ b/src/project/urls.py @@ -1,5 +1,4 @@ """URLs for the membersystem""" -import debug_toolbar from django.conf import settings from django.contrib import admin from django.contrib.auth.decorators import login_required @@ -20,5 +19,5 @@ urlpatterns = [ if settings.DEBUG: urlpatterns += [ - path("__debug__/", include(debug_toolbar.urls)), + path("__debug__/", include("debug_toolbar.urls")), ]