79758822

Date: 2025-09-08 11:35:03
Score: 1
Natty:
Report link

Posting for documenting the most likely cause of this issue for future reference:

I recently ran into this issue myself and couldn't figure it out from searching stack-overflow threads.
After spending considerable time in my debugger following a file request end-to-end, it turns out that
the culprit for me was the SENDFILE_BACKEND variable in the settings.
This was still set to our production environment settings for nginx:
SENDFILE_BACKEND = "django_sendfile.backends.nginx"

for local development django_sendfile.backends.simple works:
SENDFILE_BACKEND = "django_sendfile.backends.simple"

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Martin