From 1e495684af34a9377373e19a86c4dbaccfd3be2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adeodato=20Sim=C3=B3?= Date: Mon, 18 Sep 2023 18:57:52 -0300 Subject: [PATCH] Serve static files in debug mode --- bookwyrm/urls.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bookwyrm/urls.py b/bookwyrm/urls.py index 0ebd7925c..05972ee73 100644 --- a/bookwyrm/urls.py +++ b/bookwyrm/urls.py @@ -1,6 +1,7 @@ """ url routing for the app and api """ from django.conf.urls.static import static from django.contrib import admin +from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.urls import path, re_path from django.views.generic.base import TemplateView @@ -774,5 +775,8 @@ urlpatterns = [ path("guided-tour/", views.toggle_guided_tour), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) +# Serves /static when DEBUG is true. +urlpatterns.extend(staticfiles_urlpatterns()) + # pylint: disable=invalid-name handler500 = "bookwyrm.views.server_error"