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
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
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
> >
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
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
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.
>
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
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
, 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
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
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
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):
>"""
>
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
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,
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
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_
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
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
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
--~--~-~--~--
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...@
',
'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
> > 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
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
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):
> '''
>
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
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
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
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
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
29 matches
Mail list logo