fix: fix images

This commit is contained in:
2026-09-10 18:15:13 +02:00
parent f219128ffa
commit 8ed547603b
+7 -1
View File
@@ -15,13 +15,19 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from django.urls import path, include, re_path
from django.conf import settings
from django.conf.urls.static import static
from django.views.static import serve
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('avistamientos.urls')),
# Servir media tanto en desarrollo como en producción con Gunicorn
re_path(r'^media/(?P<path>.*)$', serve, {
'document_root': settings.MEDIA_ROOT,
}),
]
if settings.DEBUG: