Ideas are discussed in more detail on the
[https://groups.google.com/d/topic/django-
developers/N0KbgDeLuUE/discussion delegating our static file serving]
thread on django-developers.
--
Ticket URL: <https://code.djangoproject.com/ticket/27325>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: Aleksej Manaev (added)
* owner: nobody => Aleksej Manaev
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/27325#comment:1>
Old 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. [https://whitenoise.evans.io/
> 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
> [https://groups.google.com/d/topic/django-
> developers/N0KbgDeLuUE/discussion delegating our static file serving]
> thread on django-developers.
New 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. [http://whitenoise.evans.io/
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
[https://groups.google.com/d/topic/django-
developers/N0KbgDeLuUE/discussion delegating our static file serving]
thread on django-developers.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/27325#comment:2>
* has_patch: 0 => 1
Comment:
Pull Request: https://github.com/django/django/pull/8245
--
Ticket URL: <https://code.djangoproject.com/ticket/27325#comment:3>
* needs_better_patch: 0 => 1
Comment:
I agree with what Florian said on the mailing list, "I think there is no
need to vendor [whitenoise], we can just depend on it. (like we do for
pytz)". The Django-specific parts can be moved in Django. Also, Python 2
compatibility can be removed since the master branch doesn't support it
anymore. Tests and documentation are also required.
--
Ticket URL: <https://code.djangoproject.com/ticket/27325#comment:4>
Comment (by Aleksej Manaev):
If we deprecate django.contrib.staticfiles.handlers.StaticFilesHandler and
replace it by DjangoWhiteNoise in
django.contrib.staticfiles.testing.StaticLiveServerTestCase it would not
be possible to run tests without using collectstaic first. Is this an
important behavior?
tests/staticfiles_tests/test_liverserver.StaticLiveServerView.test_collectstatic_emulation
only passes with DEBUG=True.
WHITENOISE_USE_FINDERS=True causes:
"django.core.exceptions.ImproperlyConfigured: WHITENOISE_USE_FINDERS can
only be enabled in development when WHITENOISE_AUTOREFRESH is also
enabled."
--
Ticket URL: <https://code.djangoproject.com/ticket/27325#comment:5>
* needs_better_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/27325#comment:6>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/27325#comment:7>
* owner: Aleksej Manaev => (none)
* needs_better_patch: 1 => 0
* has_patch: 1 => 0
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/27325#comment:8>