From 191f8823d4566be0e84d2d520f87ca69988f43ca Mon Sep 17 00:00:00 2001 From: "Daniel (elordenador)" <54474838+dsaub@users.noreply.github.com> Date: Mon, 4 May 2026 12:32:16 +0200 Subject: [PATCH] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- proyecto/urls.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proyecto/urls.py b/proyecto/urls.py index bce3227..d7813f5 100644 --- a/proyecto/urls.py +++ b/proyecto/urls.py @@ -26,5 +26,7 @@ urlpatterns = [ path('tienda/', include('tienda.urls')) ] -if settings.DEBUG and not settings.S3_ENABLE: +if settings.DEBUG and ( + not settings.S3_ENABLE or getattr(settings, 'S3_USE_LOCAL_URLS', False) +): urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)