Recommend & add official support for django-sendfile2 in place of django-sendfile (custom serve methods)
See original GitHub issueIs your proposal related to a problem?
- Wagtail provides documentation that recommends
django-sendfile
which is no longer actively maintained - https://github.com/johnsensible/django-sendfile/issues/74
Describe the solution you’d like
- Unit test updates - current unit tests explicitly include
django-sendfile
to support the documented approach it seems, plus probably a bit of a pre 1.0 legacy - Documentation updates - documentation advises using
django-sendfile
when it is probably better to support the more maintaineddjango-sendfile2
, it should be directly compatible but this change should come after the unit test changes (or in the same PR) - Potentially replace
utils/sendfile
with an optional import ofdjango-sendfile2
if needed (which is a copy of an even older version of thedjango-sendfile
code)
Describe alternatives you’ve considered
- Do nothing, the current solution of a copy of
django-sendfile
mostly works but has some issues and will likely break in future Django versions.
Additional context
- Wagtail included
django-sendfile
for custom serve methods of images, but then moved to a more generic approach around 1.0 https://github.com/wagtail/wagtail/pull/1363 - Our documentation does say
django-sendfile
but it is not actually used directly, but to be fair it is a bit confusing and maybe something could be clearer. - Images - https://docs.wagtail.org/en/stable/advanced_topics/images/image_serve_view.html#integration-with-django-sendfile
SENDFILE_BACKEND
setting - Docs - https://docs.wagtail.org/en/stable/reference/settings.html#wagtaildocs-serve-method
WAGTAILDOCS_SERVE_METHOD
setting - https://django-downloadview.readthedocs.io/en/latest/django-sendfile.html
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (14 by maintainers)
Top Results From Across the Web
List of scanned packages - SourceCode.AI
... adaptivepele adb-wifi adcircpy adcpy adct add-fraction addons addpack addpio ... avro-schema avro-service-clients avro-to-python avro-validator avro3k ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Removing ‘good first issue’ label as this will likely be a solid amount of work and require someone with knowledge of custom serve methods and django-sendfile to understand.
@spapas please review the updated description and confirm this covers what you are expecting.
Note that the issue templates really do help when requesting enhancements.