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
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.
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
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:
> >
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
>
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
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
7 matches
Mail list logo