Re: never_cache doesn't work for login page

2009-07-21 Thread Ronghui Yu
e, so at last the browser uses the former one. >> It works fine after removing this middleware. >> I believe this middleware cannot work with never_cache. >> >> Eugene Mirotin ??: >> >> >> >> >>> Isn't adding a timestamp to the url

Re: never_cache doesn't work for login page

2009-07-20 Thread Michael
middleware. > I believe this middleware cannot work with never_cache. > I think you found a bug in the ConditionalGetMiddleware or the log in page. The content on the page changes due to the token being updated on every reload, so something is wrong there. I would file a ticket in the tracker a

Re: never_cache doesn't work for login page

2009-07-20 Thread Eugene Mirotin
gt; It works fine after removing this middleware. > I believe this middleware cannot work with never_cache. > > Eugene Mirotin ??: > > > > > Isn't adding a timestamp to the url a workaround? > > I mean making all links to /login/ look like /login/?_=timestamp > >

Re: never_cache doesn't work for login page

2009-07-19 Thread Ronghui Yu
It proves that it is introduced by django.middleware.http.ConditionalGetMiddleware. It returns 304 when requesting the same login page, so at last the browser uses the former one. It works fine after removing this middleware. I believe this middleware cannot work with never_cache. Eugene

Re: never_cache doesn't work for login page

2009-07-19 Thread Ronghui Yu
27;t get update. If the >> browser cache is cleaned before opening the login page, then it works >> fine. But this is not what I expect. >> >> When look into django.contrib.auth.views, the login view is decorated by >> never_cache, but actually it doesn't work for

Re: never_cache doesn't work for login page

2009-07-19 Thread Ronghui Yu
ecause the browser cache the login >> page, so each time the login page is opened, the >> csrfmiddlearetoken value doesn't get update. If the browser >> cache is cleaned before opening the login page, then it works >> fine. But this is not what I expect. >

Re: never_cache doesn't work for login page

2009-07-18 Thread Eugene Mirotin
so each time the login > page is opened, the csrfmiddlearetoken value doesn't get update. If the > browser cache is cleaned before opening the login page, then it works > fine. But this is not what I expect. > > When look into django.contrib.auth.views, the login view is decorat

Re: never_cache doesn't work for login page

2009-07-17 Thread Michael
fore opening the login page, then it works fine. But this >> is not what I expect. >> >> When look into django.contrib.auth.views, the login view is decorated by >> never_cache, but actually it doesn't work for me. I have no idea what's >> wrong with it. Has an

Re: never_cache doesn't work for login page

2009-07-17 Thread Ronghui Yu
, then it works fine. But this is not what I > expect. > > When look into django.contrib.auth.views, the login view is > decorated by never_cache, but actually it doesn't work for me. I > have no idea what's wrong with it. Has anybody ever encounted th

Re: never_cache doesn't work for login page

2009-07-17 Thread Michael
ntrib.auth.views, the login view is decorated by > never_cache, but actually it doesn't work for me. I have no idea what's > wrong with it. Has anybody ever encounted this situation? Or could anybody > give me some hints? > > Thanks in advance. > > -- > Ronghui Yu > I h

never_cache doesn't work for login page

2009-07-17 Thread Ronghui Yu
login page is opened, the csrfmiddlearetoken value doesn't get update. If the browser cache is cleaned before opening the login page, then it works fine. But this is not what I expect. When look into django.contrib.auth.views, the login view is decorated by never_cache, but actually it doesn&#

Re: [django] Re: never_cache and firefox

2009-03-03 Thread Ricardo Newbery
2.3, 2.4 > fallback. > > from django.utils.decorators import decorator_from_middleware > from django.utils.cache import patch_cache_control, > add_never_cache_headers > from django.middleware.cache import CacheMiddleware > > def really_never_cache(view_func): >""" >

Re: never_cache and firefox

2009-03-03 Thread davathar
mport patch_cache_control, add_never_cache_headers from django.middleware.cache import CacheMiddleware def really_never_cache(view_func): """ Replacement Decorator for never_cache that adds a few more headers to a response so that it will never be cached. ""&qu

Re: never_cache and firefox

2009-03-03 Thread davathar
13:48 -0800, davathar wrote: > > I'm using @never_cache as follows and IE7 has the correct behavior, > > but Firefox 3.06 allows me to view the content of all previous pages > > by clicking the back button even after going through a logout. > > [] > > > So,

Re: never_cache and firefox

2009-03-03 Thread Malcolm Tredinnick
On Tue, 2009-03-03 at 13:48 -0800, davathar wrote: > I'm using @never_cache as follows and IE7 has the correct behavior, > but Firefox 3.06 allows me to view the content of all previous pages > by clicking the back button even after going through a logout. [] > So, is this

Re: never_cache and firefox

2009-03-03 Thread Alex Gaynor
On Tue, Mar 3, 2009 at 4:48 PM, davathar wrote: > > I'm using @never_cache as follows and IE7 has the correct behavior, > but Firefox 3.06 allows me to view the content of all previous pages > by clicking the back button even after going through a logout. > > @never_

never_cache and firefox

2009-03-03 Thread davathar
I'm using @never_cache as follows and IE7 has the correct behavior, but Firefox 3.06 allows me to view the content of all previous pages by clicking the back button even after going through a logout. @never_cache @login_required() def search(request, search): Gmail has the correct behavi

Re: @cache_control() and @never_cache not working

2009-01-30 Thread BluMarble
Thanks for the help Thomas, unfortunetly it wouldn't be within budget to port this site over to 1.0. Will however look into the link you provided. On Jan 29, 12:50 pm, Tomas Kopecek wrote: > In that version (0.96) of Django was bug in combination of these > decorators and CacheMiddleware. If you

Re: @cache_control() and @never_cache not working

2009-01-29 Thread Tomas Kopecek
In that version (0.96) of Django was bug in combination of these decorators and CacheMiddleware. If you can use upstream version then everything will be working. Otherwise look for these (closed) tickets on http://code.djangoproject.com and patch your version. Tomas Kopecek --~--~-~--~--

Re: @cache_control() and @never_cache not working

2009-01-28 Thread BluMarble
Anyone? --~--~-~--~~~---~--~~ 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 django-users+unsubscr...@

@cache_control() and @never_cache not working

2009-01-27 Thread BluMarble
', 'django.middleware.doc.XViewMiddleware', ) >>> views.py @never_cache def some_view(request): ... @cache_control(no_cache=True, max_age=0) def some_view(request): ... Okay so I think i've got the above right but all the views with the above decorator cache anyw

Re: how to use never_cache?

2008-09-13 Thread V
> > Rather than suspecting caching, I'd suspect you've got code running at > > import time instead of form instantiation time that is determining the file > > list.  You did not include the form definition, though, in what you showed > > us, so it's hard to be sure. Perfect pointer Karen, with y

Re: how to use never_cache?

2008-09-12 Thread V
top of admin [1] that lists a > > directories content using a FilePathField element. > > > It works kind of alright except that the list isn't updated. I presume that > > this is something related to caching so I added @never_cache to the view > > function, but it didn

Re: how to use never_cache?

2008-09-12 Thread Karen Tracey
sume that > this is something related to caching so I added @never_cache to the view > function, but it didn't solve my problem. Now the code is > > @user_passes_test(lambda u: u.is_staff) > @never_cache > def select(request): > ''' >

how to use never_cache?

2008-09-12 Thread Vikti
Hi! I am trying to write a simple app on top of admin [1] that lists a directories content using a FilePathField element. It works kind of alright except that the list isn't updated. I presume that this is something related to caching so I added @never_cache to the view function, but it d

'never_cache' decorator doesn't really prevent the page from being cached

2007-09-06 Thread Przemyslaw Wegrzyn
Hi! I've tried to use never_cache from django.views.decorators.cache, however my page was still getting cached by my ISP's transparent proxy and/or my browser. I've checked that the headers that this decorator adds were e.g.: Expires: Thu, 06 Sep 2007 19:08:26 GMT Last-Modifi

Re: never_cache

2007-07-10 Thread James Bennett
On 7/10/07, Mason <[EMAIL PROTECTED]> wrote: > Hello, I'm a newbie to Dajngo (using version 0.96). I am trying to > keep a particular web page from being cached, ie. I don't want the > user to be able to hit the "Back" button on the browser and use the > previous page to resubmit data to the serve

Re: never_cache

2007-07-10 Thread Thomas Guettler
Am Dienstag, 10. Juli 2007 13:30 schrieb Mason: > Hello, I'm a newbie to Dajngo (using version 0.96). I am trying to > keep a particular web page from being cached, ie. I don't want the > user to be able to hit the "Back" button on the browser and use the > previous page to resubmit data to the se

never_cache

2007-07-10 Thread Mason
Hello, I'm a newbie to Dajngo (using version 0.96). I am trying to keep a particular web page from being cached, ie. I don't want the user to be able to hit the "Back" button on the browser and use the previous page to resubmit data to the server. I have been trying to use