Opened 8 years ago
Last modified 8 months ago
#27325 new New feature
Offer a solution for static file serving suitable for production use — at Initial Version
Reported by: | Tim Graham | Owned by: | nobody |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Aleksej Manaev, Ülgen Sarıkavak | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The documentation for the function for serving static files, django.contrib.staticfiles.views.serve()
, describes it as "grossly inefficient and probably insecure. This is only intended for local development, and should never be used in production." To ease the deployment of small sites, it would be nice to fix or replace it with something that could be used in production. WhiteNoise is an example of static file serving done in Python and is a possible candidate for integration in Django.
Ideas are discussed in more detail on the delegating our static file serving thread on django-developers.