"Todd O'Bryan" <[EMAIL PROTECTED]> writes:

> Yes, this will be slower than having Apache serve the file directly,  
> but it has the huge advantage that the file is served as the result  
> of a view. That means you can do all kinds of interesting permission  
> checking, url mapping, and general futzing around internal to Django,  
> without having to interact with whichever web server you're using.

You can already do all those sorts of things by writing views that
read files from the filesystem and return them wrapped in a
HttpResponse.  I've done this myself in a recent application.  The
files just need to be stored outside of Apache's DocumentRoot (or
whatever the equivalent on lighttpd or your server of choice is).
That requirement interacts inconveniently with the admin app's
handling of FileFields, but there are at least two ways to work around
that.  So you don't actually need to store files in the database in
order to do this.

-- 
+-----------------------------------------------------------+
| Jason F. McBrayer                    [EMAIL PROTECTED]  |
| A flower falls, even though we love it; and a weed grows, |
| even though we do not love it.            -- Dogen        |

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to