Re: serving static file via django

2008-11-20 Thread David Christiansen
Pranav, Have you considered just writing a view that returns the data in the file with the appropriate headers? That's very easy to do and doesn't require loading the whole static serve method. You can then also put whatever tracking you wanted in that view function. If you want, I can send

Re: serving static file via django

2008-11-20 Thread Steve Holden
Graham Dumpleton wrote: > > > On Nov 20, 1:41 pm, Steve Holden <[EMAIL PROTECTED]> wrote: [...] >> 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, > > I really

Re: serving static file via django

2008-11-19 Thread Graham Dumpleton
On Nov 20, 1:41 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > [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,

Re: serving static file via django

2008-11-19 Thread Steve Holden
[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. > >

Re: serving static file via django

2008-11-19 Thread Tim Chase
> yes..its just a transparent gif...i'm thinking of writing my > own view, which will get the visitor data and then just call > the static serve method provided by django. just dont know it > its ok inproduction env though.. I'd be tempted to just serve this file like any other static-media

Re: serving static file via django

2008-11-19 Thread varikin
On Nov 19, 12:55 am, "David Zhou" <[EMAIL PROTECTED]> wrote: > On Wed, Nov 19, 2008 at 1:54 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > yes..its just a transparent gif...i'm thinking of writing my own view, > > which will get the visitor data and then just call the static serve > >

Re: serving static file via django

2008-11-18 Thread David Zhou
On Wed, Nov 19, 2008 at 1:54 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > yes..its just a transparent gif...i'm thinking of writing my own view, > which will get the visitor data and then just call the static serve > method provided by django. > just dont know it its ok inproduction env

Re: serving static file via django

2008-11-18 Thread [EMAIL PROTECTED]
yes..its just a transparent gif...i'm thinking of writing my own view, which will get the visitor data and then just call the static serve method provided by django. just dont know it its ok inproduction env though.. On Nov 19, 12:53 am, "David Zhou" <[EMAIL PROTECTED]> wrote: > I was initially

Re: serving static file via django

2008-11-18 Thread David Zhou
I was initially thinking that if you knew which pages you wanted to track, you could capture those requests via signals, rather than via requets to a file. But if it's an explicit requirement to track hits to that file, then that wouldn't work. Is the file a transparent gif that's solely used

Re: serving static file via django

2008-11-18 Thread [EMAIL PROTECTED]
david, its a biz requirement for me to track what http requests are being made to this file. used in generating internal metric reports. I guess i'll have to dig into the django code to see how signals are used..do you know of any example where the request_finished signal is used ? thanks, -p

Re: serving static file via django

2008-11-18 Thread David Zhou
On Tue, Nov 18, 2008 at 9:40 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > david, > > can you illustrate how ? sorry -- havent worked with django signals > earlier I might be misunderstanding your need to track requests to that file, but if you're using it to track requests in Django in

Re: serving static file via django

2008-11-18 Thread [EMAIL PROTECTED]
david, can you illustrate how ? sorry -- havent worked with django signals earlier thnx, -p On Nov 18, 7:06 pm, "David Zhou" <[EMAIL PROTECTED]> wrote: > On Tue, Nov 18, 2008 at 6:22 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > my requirement is that I need to serve just one 10x10 gif

Re: serving static file via django

2008-11-18 Thread David Zhou
On Tue, Nov 18, 2008 at 6:22 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > 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

serving static file via django

2008-11-18 Thread [EMAIL PROTECTED]
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