Re: delegating our static file serving

2017-04-04 Thread David Evans
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

Re: delegating our static file serving

2016-12-20 Thread David Evans
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

Re: Revisiting lazy middleware initialization

2016-03-25 Thread David Evans
:08 a.m., "Florian Apolloner" <f.apollo...@gmail.com> 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 <drh@gmail.com> wrote: >> >> &g

Revisiting lazy middleware initialization

2016-03-24 Thread David Evans
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

Re: Feedback on Django Channels

2016-03-21 Thread David Evans
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

Re: delegating our static file serving

2016-01-08 Thread David Evans
! 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 wrote WhiteNoise the

Re: delegating our static file serving

2015-12-29 Thread David Evans
gt; * 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:09:11 AM UTC-4, David Evans wrote: >>

Re: delegating our static file serving

2015-06-20 Thread David Evans
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

Re: delegating our static file serving

2014-12-05 Thread David Evans
+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

Re: delegating our static file serving

2014-12-01 Thread David Evans
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

Re: Proposal to add a secure JSON encoding template tag

2014-06-10 Thread David Evans
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 Evans wro

Re: Proposal to add a secure JSON encoding template tag

2014-05-15 Thread David Evans
mmon 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. This was rejected

Proposal to add a secure JSON encoding template tag

2014-05-13 Thread David Evans
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