fix: loading of profile images in devstack (#28555)

Profile images don't load in the devstack since the path for media files is
broader than the path for profile images, reorderig them fixes this.
This commit is contained in:
Kshitij Sobti
2021-09-07 13:58:28 +00:00
committed by GitHub
parent d3a3f52d69
commit 982c98d1bd

View File

@@ -922,11 +922,12 @@ urlpatterns += [
if settings.DEBUG:
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
# profile image urls must come before the media url to work
urlpatterns += static(
settings.PROFILE_IMAGE_BACKEND['options']['base_url'],
document_root=settings.PROFILE_IMAGE_BACKEND['options']['location']
)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
# UX reference templates
urlpatterns += [