Re: problem with middleware - correctly formatted

2011-09-29 Thread Tom Evans
On Thu, Sep 29, 2011 at 2:18 AM, jenia ivlev wrote: > Hello: > > This is the second version of my question. I reformatted it. > > I have defined a middleware class. and i have added it to the > middleware_classes attribute in setting. When a request comes in, the > middleware class gets created (t

problem with middleware - correctly formatted

2011-09-28 Thread jenia ivlev
Hello: This is the second version of my question. I reformatted it. I have defined a middleware class. and i have added it to the middleware_classes attribute in setting. When a request comes in, the middleware class gets created (the debugger catches the code when the breakpoint is on the class

problem with middleware

2011-09-28 Thread jenia ivlev
Hello: I have defined a middleware class. and i have added it to the middleware_classes attribute in setting. When a request comes in, the middleware class gets created (the debugger catches the code when the breakpoint is on the class CommonFiilter(): line) Now i expect the function def process

Re: Problem with middleware

2006-07-10 Thread Guillermo Fernandez Castellanos
That's probably it. I don't know why, but I had this wrong idea that the 'get' would *assign* a default value to the dictionary if the value was not found! Thanks to both of you. G On 7/10/06, Ian Holsman <[EMAIL PROTECTED]> wrote: > > Hi Gullermo. > > I've done the same thing here: > http://s

Re: Problem with middleware

2006-07-09 Thread Ian Holsman
Hi Gullermo.I've done the same thing here:http://svn.zyons.python-hosting.com/trunk/zilbo/common/utils/middleware/lastseen.pyby the looks of it you are forgetting to actually store it.ie      request.session['sysvortex_last_visit'] =  datetime.datetime.now() cheersIan.On 09/07/2006, at 11:56 PM, Gu

Re: Problem with middleware

2006-07-09 Thread Don Arbow
On Jul 9, 2006, at 6:56 AM, Guillermo Fernandez Castellanos wrote: > > class IpMiddleware: >def _add_ip(this_ip): > # Adds IP and Visit to database >[...] >def process_view(self, request, view_func, view_args, view_kwargs): >last_visit=request.session.get('sysvortex_las

Problem with middleware

2006-07-09 Thread Guillermo Fernandez Castellanos
Hi, Seems like last time I was not that clear, so here is what I want to do: I want to keep track of the users that visit my site, keeping in the DB what IP addresses visited my site, when, ... I define a visit as a click on one of my pages, given that this visit is done a certain time after the