It's worth flagging up that part of what makes WhiteNoise good for serving
static files in production also makes it not quite as good for using in
development.
Most file servers work by taking the requested URL, constructing a local
path from it, and then checking whether a file exists at that
+1 to this: I'm all in favour of supporting production-adequate static file
handling in core. A couple of small points:
We already have the views, api, and logic around for finding and serving
> the correct files.
One question that needs to be thought through is the role of
`collectstatic` and
On Friday, 5 December 2014 19:14:29 UTC, Carl Meyer wrote:
>
> On 12/04/2014 10:33 PM, Collin Anderson wrote:
> > Hi All,
> >
> > I'm pretty interested in getting secure and _somewhat_ efficient static
> > file serving in Django.
> >
> > Quick history:
> > 2005 - Jacob commits #428: a "stati
> * django/contrib/staticfiles/views.py
> * django/contrib/staticfiles/management/commands/runserver.py
> * django/contrib/staticfiles/handlers.py
> * django/views/static.py
>
> Any objections to doing further investigation in this area?
>
> On Saturday, June 20, 2015 at 8
There was some discussion previously (see
https://code.djangoproject.com/ticket/17419) of adding a JSON encoding
filter to Django. This was rejected as being impossible (or very difficult)
to do securely. However the requirement to embed JSON in an HTML page is
quite a common one, and it's easy
handle some common cases.
>
> --
> Michael Mior
>
> On Tuesday, May 13, 2014 6:03:43 AM UTC-4, David Evans wrote:
>>
>> There was some discussion previously (see
>> https://code.djangoproject.com/ticket/17419) of adding a JSON encoding
>> filter to Django. Thi
note, it's good practice for JS templates to live within
> script blocks too. I have {% scriptblock %}{% endscriptblock %} that is
> sits next to {% jsonblock %} in my custom library since it uses the same
> escaping methods.
>
>
>
> On Tuesday, May 13, 2014 10:03:43 PM UTC+12, David
wsgi.py!
This approach will be marginally less efficient than handling things at the
WSGI layer, but the integration is much cleaner.
On Tuesday, 29 December 2015 17:31:02 UTC, David Evans wrote:
>
> I'd be very happy to help with this. Two things to mention:
>
> 1. When I first w
On the static files question, I'm about to release v3 of WhiteNoise
(http://whitenoise.evans.io/en/latest/changelog.html) which provides the
option to integrate via Django middlware, rather than wsgi middleware. (It
uses the FileResponse class, which didn't exist when I first wrote
WhiteNoise.)
Hi all,
Currently, middleware is initialized lazily on serving the first request,
rather than on application start. There may well have been good reasons for
this historically, but I don't think they apply any longer. Lazy
initialization is unhelpful if a middleware class throws an error (e.g t
16 10:08 a.m., "Florian Apolloner"
wrote:
> +1 -- Patches welcome :D
>
> On Friday, March 25, 2016 at 11:02:26 AM UTC+1, Aymeric Augustin wrote:
>>
>> On 24 Mar 2016, at 17:39, David Evans wrote:
>>
>>
>> Currently, middleware is initialized
I've been intending to work on this for a while (as the original author of
WhiteNoise it would make the most sense for me to do the integration work)
but as ever the problem has been finding the time. I've been hoping to make
some progress on this over the Christmas period, but we'll see what ha
Hi Aleksej,
Thanks for your work on this, and sorry I haven't replied sooner -- just
been busy with lots of other things ;)
My plan for integrating WhiteNoise was actually to merge it in as part of
contrib.staticfiles and basically stop development on it as an independent
project. When I first
13 matches
Mail list logo