From 6da1e6d97a5fe89a2259724f14ce055cc1ac3236 Mon Sep 17 00:00:00 2001 From: robinpdev Date: Mon, 11 Mar 2024 13:13:19 +0100 Subject: [PATCH] user uploads toevoegen --- .gitignore | 1 + Makefile | 5 ++++- backend/pigeonhole/urls.py | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3ed07993..e4642805 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .env django/db.sqlite3 backend/db.sqlite3 +backend/uploads venv/ .venv/ diff --git a/Makefile b/Makefile index 01c1abef..9c0b630b 100644 --- a/Makefile +++ b/Makefile @@ -6,4 +6,7 @@ stop: lint: docker exec pigeonhole-backend flake8 . - docker exec pigeonhole-frontend npm run lint \ No newline at end of file + docker exec pigeonhole-frontend npm run lint + +backendshell: + docker exec -it pigeonhole-backend sh \ No newline at end of file diff --git a/backend/pigeonhole/urls.py b/backend/pigeonhole/urls.py index 5a76951a..d9d206f9 100644 --- a/backend/pigeonhole/urls.py +++ b/backend/pigeonhole/urls.py @@ -1,5 +1,7 @@ from django.contrib import admin from django.urls import include, path +from django.conf import settings +from django.conf.urls.static import static from drf_yasg import openapi from drf_yasg.views import get_schema_view from rest_framework import routers, permissions @@ -39,6 +41,6 @@ path('swagger/', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'), path('redoc/', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'), path("admin/", admin.site.urls), -] +] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) urlpatterns += router.urls