[EMAIL PROTECTED] wrote:
> i know that django is not recommended to serve static content via
> django and the web server handler should be used for it.
> 
> also, the following method to serve static content in development env,
> but not recommended in a production env.
> 
> django.views.static.serve
> 
> http://docs.djangoproject.com/en/dev/howto/static-files/?from=olddocs
> 
> my requirement is that I need to serve just one 10x10 gif file via
> django -- so that i can track what users requested the file. can i use
> the above view to serve this file ? what are the drawbacks of using
> this view in a production env ?
> 
It's not like the Django thought-police will beat down your door in the
middle of the night if you *do* serve a single piece of static content.
But you should carefully read the warnings in the documentation about
serving static files before deciding to do so.

The drawbacks are that the Django web servers aren't designed to the
same rigorous security standards that are applied to production web
servers like Apache and lighthttpd, and won't be (quite) as efficient.
The efficiency probably won't matter for a (one-pixel?) graphics.

Whether what the Django server *does* provide is sufficiently secure for
your needs only you can decide. But you can't say you weren't warned if
everything goes pear-shaped ;-)

regards
 Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC              http://www.holdenweb.com/

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

Reply via email to