Re: Serious Sessions Flaw/Bug/Error Discovered

2009-03-01 Thread James Mowery
Wow, I think I just had an epiphany... So, I think this issue is related. Since Django's development server is serving up the files, with the middleware's code the way it is, I think it is, essentially, telling the browser to load full_page_advertisement.html for every single request. So, when

Re: Serious Sessions Flaw/Bug/Error Discovered

2009-03-01 Thread James Mowery
The output from the command when viewing the page: Development server is running at http://127.0.0.1:8000/ Quit the server with CONTROL-C. [01/Mar/2009 03:39:07] "GET /site_media/images/advt_728x90.png HTTP/ 1.1" 200 28969 [01/Mar/2009 03:39:07] "GET /site_media/images/fp/edpicks/fp3.png HTTP/ 1.

Re: Serious Sessions Flaw/Bug/Error Discovered

2009-03-01 Thread Malcolm Tredinnick
On Sun, 2009-03-01 at 00:03 -0800, James Mowery wrote: > The full story: http://dpaste.com/3776/ > The settings.py that got me there: http://dpaste.com/3774/ > > http://dpaste.com/3778/ > That code does work, but notice that the value does not increment. The second piece of code (which seems to

Re: Serious Sessions Flaw/Bug/Error Discovered

2009-03-01 Thread James Mowery
The full story: http://dpaste.com/3776/ The settings.py that got me there: http://dpaste.com/3774/ http://dpaste.com/3778/ That code does work, but notice that the value does not increment. On Mar 1, 2:45 am, Malcolm Tredinnick wrote: > On Sat, 2009-02-28 at 23:21 -0800, James Mowery wrote: > >

Re: Serious Sessions Flaw/Bug/Error Discovered

2009-02-28 Thread Malcolm Tredinnick
On Sat, 2009-02-28 at 23:21 -0800, James Mowery wrote: > from django.shortcuts import render_to_response > > class FullPageAdMiddleware(object): > def process_view(self, request, view_func, view_args, > view_kwargs): > > request.session['testing'] = request.session['testing'] + 1 >

Re: Serious Sessions Flaw/Bug/Error Discovered

2009-02-28 Thread James Bennett
On Sun, Mar 1, 2009 at 2:21 AM, James Mowery wrote: > This code fails to work properly. There are numerous issues with even > this example, and I could probably simply the code further, but here > are some of the errors: Note that the subject of this message is misleading; if there were such ser

Serious Sessions Flaw/Bug/Error Discovered

2009-02-28 Thread James Mowery
from django.shortcuts import render_to_response class FullPageAdMiddleware(object): def process_view(self, request, view_func, view_args, view_kwargs): request.session['testing'] = request.session['testing'] + 1 if request.session['testing'] > 10: return None