From 3e571cff3d5f63f7c16949f17c35bdb525b40237 Mon Sep 17 00:00:00 2001 From: Jens Diemer Date: Mon, 3 Apr 2023 15:59:13 +0200 Subject: [PATCH] Bugfix serve media files `admin.site.urls` must be the last pattern! --- conf/urls.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/urls.py b/conf/urls.py index a0d3dae..0fa3469 100644 --- a/conf/urls.py +++ b/conf/urls.py @@ -9,10 +9,11 @@ if settings.PATH_URL: # settings.PATH_URL is the $YNH_APP_ARG_PATH # Prefix all urls with "PATH_URL": urlpatterns = [ - path(f'{settings.PATH_URL}/', admin.site.urls), path(f'{settings.PATH_URL}/media//', UserMediaView.as_view()), # TODO: https://github.com/jedie/django-for-runners/issues/25 # path(settings.MEDIA_URL.lstrip('/'), include('django_tools.serve_media_app.urls')), + + path(f'{settings.PATH_URL}/', admin.site.urls), ] else: # Installed to domain root, without a path prefix