fix: address PR review issues for catalogue images

- Use PNG format instead of JPEG for transparency support
- Non-strict mode only resizes if image width > target width
- Replace CATALOGUE_BACKGROUND_IMAGES_COLOR with CATALOGUE_BACKGROUND_IMAGES_RGBA (tuple default (0,0,0,0))
- Move all inline imports to top of test file
- Add test_resize_non_strict_no_upscale test case
- Add comment explaining settings.DEBUG guard for media serving
This commit is contained in:
mono
2026-06-13 14:57:25 -05:00
parent 7112197ad2
commit 539629076f
4 changed files with 34 additions and 43 deletions

View File

@@ -35,5 +35,7 @@ urlpatterns = [
path('api/users/', include('users.urls')),
]
# Serve media files through Django only in development.
# In production/staging, media is served by the web server (nginx).
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)