Fixes and cleanup.

This commit is contained in:
Víðir Valberg Guðmundsson 2022-08-09 19:29:42 +02:00
parent 4c5d0e30ab
commit 3dde14614f
6 changed files with 11 additions and 16 deletions

View file

@ -35,11 +35,5 @@ poetry_lock:
poetry_command: poetry_command:
${DOCKER_RUN} ${DOCKER_CONTAINER_NAME} poetry ${COMMAND} ${DOCKER_RUN} ${DOCKER_CONTAINER_NAME} poetry ${COMMAND}
build_dev_docker_image: build_docker_image:
${DOCKER_COMPOSE} build ${DOCKER_CONTAINER_NAME} ${DOCKER_COMPOSE} build ${DOCKER_CONTAINER_NAME}
tailwind_install:
${MANAGE_COMMAND} tailwind install --no-input
tailwind_build:
${MANAGE_COMMAND} tailwind build --no-input

2
env
View file

@ -4,4 +4,4 @@ POSTGRES_PASSWORD=postgres
POSTGRES_PORT=5432 POSTGRES_PORT=5432
DATABASE_URL=postgres://postgres:postgres@postgres:5432/postgres DATABASE_URL=postgres://postgres:postgres@postgres:5432/postgres
DEBUG=True DEBUG=True
DJANGO_ENV=all DJANGO_ENV=development

8
poetry.lock generated
View file

@ -162,14 +162,14 @@ python-versions = "*"
[[package]] [[package]]
name = "django-debug-toolbar" 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." description = "A configurable set of panels that display various debug information about the current request/response."
category = "dev" category = "dev"
optional = false optional = false
python-versions = ">=3.6" python-versions = ">=3.7"
[package.dependencies] [package.dependencies]
Django = ">=2.2" Django = ">=3.2"
sqlparse = ">=0.2.0" sqlparse = ">=0.2.0"
[[package]] [[package]]
@ -503,7 +503,7 @@ brotli = ["brotli"]
[metadata] [metadata]
lock-version = "1.1" lock-version = "1.1"
python-versions = "^3.10" python-versions = "^3.10"
content-hash = "b9c94675105cfb9daa966cd4b3de9971cdbc6480c833aa7176514fd6ea67a70c" content-hash = "36626d533a72d4a8597cc1109cf41e383ef0f3663e36770cfe00feac0679ac7d"
[metadata.files] [metadata.files]
asgiref = [] asgiref = []

View file

@ -17,7 +17,7 @@ whitenoise = "^5.2"
[tool.poetry.dev-dependencies] [tool.poetry.dev-dependencies]
pytest = "^5.1" pytest = "^5.1"
pytest-django = "^3.5" pytest-django = "^3.5"
django-debug-toolbar = "^3.2" django-debug-toolbar = "^3.5"
[build-system] [build-system]
requires = ["poetry>=0.12"] requires = ["poetry>=0.12"]

View file

@ -16,7 +16,9 @@ SECRET_KEY = env.str("SECRET_KEY", default="something-very-secret")
DEBUG = env.bool("DEBUG", default=False) DEBUG = env.bool("DEBUG", default=False)
ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=["*"]) 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=[])] ADMINS = [tuple(x.split(":")) for x in env.list("DJANGO_ADMINS", default=[])]

View file

@ -1,5 +1,4 @@
"""URLs for the membersystem""" """URLs for the membersystem"""
import debug_toolbar
from django.conf import settings from django.conf import settings
from django.contrib import admin from django.contrib import admin
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
@ -20,5 +19,5 @@ urlpatterns = [
if settings.DEBUG: if settings.DEBUG:
urlpatterns += [ urlpatterns += [
path("__debug__/", include(debug_toolbar.urls)), path("__debug__/", include("debug_toolbar.urls")),
] ]