On Wed, Apr 14, 2010 at 10:42 AM, Ed Menendez <edmenen...@gmail.com> wrote: > Is there any interest in turning this into a patch for a new feature? > > http://menendez.com/blog/using-django-as-pass-through-image-proxy/ > > It should only be used on dev servers but it really is a huge time > saver for developers vs rsync and since it keeps images locally it's a > better solution than prod images via S3. > > It's 100% backward compatible and could be implemented with either a > settings and/or a change in the view parameter. > > (r'^(?P<path>.*)$', 'static_fallback.serve', {'document_root' : '/ > path/to/my/files/', 'fallback_static_url': 'http://myprodsite.com' }) > > or > > FALLBACK_STATIC_URL = 'http://myprodsite.com' > > If anyone think it's a good idea, let me know and I'll create a patch.
Broadly speaking, yes, but: * I'm not a fan of the separate FALLBACK_STATIC_URL setting. This isn't something that needs to be extraordinarily flexible - you're going to drop a static view in a DEBUG block in your urls.py for testing purposes, and you should be able to specify your fallback there. * The caching behavior makes me a little nervous. I don't have any problems with the idea of falling back to a main image server, and the idea that those requests can be optimized sounds good; However, I'm concerned that users could get caught in a web of partially updated caches, or get into conflicts where a local file that a user is working with is overwritten by an enthusiastic downstream cache retrieval. * That said, we're in the closing phases of getting Django 1.2 out the door, so now isn't the best time to propose or discuss new features. Once 1.2 is out, we'll open the floor for discussion of new proposals. Yours, Russ Magee %-) -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.