Re: never_cache doesn't work for login page

2009-07-21 Thread Ronghui Yu
Eugene Mirotin ??: > May be the order of middleware classes does matter here? > > On Jul 19, 4:08 pm, Ronghui Yu wrote: > >> 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

Re: never_cache doesn't work for login page

2009-07-20 Thread Michael
On Sun, Jul 19, 2009 at 9:08 AM, Ronghui Yu wrote: > 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 beli

Re: never_cache doesn't work for login page

2009-07-20 Thread Eugene Mirotin
May be the order of middleware classes does matter here? On Jul 19, 4:08 pm, Ronghui Yu wrote: > 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

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 Mirotin

Re: never_cache doesn't work for login page

2009-07-19 Thread Ronghui Yu
That's a good idea. I'll make it the last resort if I can't figure out a better way to handle it. Thank you Eugene Mirotin ??: > Isn't adding a timestamp to the url a workaround? > I mean making all links to /login/ look like /login/?_=timestamp > This can be easily done on the client side with s

Re: never_cache doesn't work for login page

2009-07-19 Thread Ronghui Yu
Michael 写道: > On Fri, Jul 17, 2009 at 11:19 AM, Ronghui Yu > wrote: > > > > Michael 写道: >> 2009/7/17 Ronghui Yu mailto:stone...@gmail.com>> >> >> Hi, All, >> >> I have a project that have CsrfMiddleware enable, all forms >> work fine, bu

Re: never_cache doesn't work for login page

2009-07-18 Thread Eugene Mirotin
Isn't adding a timestamp to the url a workaround? I mean making all links to /login/ look like /login/?_=timestamp This can be easily done on the client side with some JS library, or, on the server side. Not nice, but it should help, I guess. On Jul 17, 5:24 pm, Ronghui Yu wrote: > Hi, All, > >

Re: never_cache doesn't work for login page

2009-07-17 Thread Michael
On Fri, Jul 17, 2009 at 11:19 AM, Ronghui Yu wrote: > > > Michael 写道: > > 2009/7/17 Ronghui Yu > >> Hi, All, >> >> I have a project that have CsrfMiddleware enable, all forms work fine, but >> the login form doesn't, for all browsers(IE,Chrome,Firefox,Safari). >> Most of the time, it throws 403,

Re: never_cache doesn't work for login page

2009-07-17 Thread Ronghui Yu
Michael ??: > 2009/7/17 Ronghui Yu mailto:stone...@gmail.com>> > > Hi, All, > > I have a project that have CsrfMiddleware enable, all forms work > fine, but the login form doesn't, for all > browsers(IE,Chrome,Firefox,Safari). > Most of the time, it throws 403, which is thrown

Re: never_cache doesn't work for login page

2009-07-17 Thread Michael
2009/7/17 Ronghui Yu > Hi, All, > > I have a project that have CsrfMiddleware enable, all forms work fine, but > the login form doesn't, for all browsers(IE,Chrome,Firefox,Safari). > Most of the time, it throws 403, which is thrown by CsrfMiddleware. That's > because the browser cache the login

never_cache doesn't work for login page

2009-07-17 Thread Ronghui Yu
Hi, All, I have a project that have CsrfMiddleware enable, all forms work fine, but the login form doesn't, for all browsers(IE,Chrome,Firefox,Safari). Most of the time, it throws 403, which is thrown by CsrfMiddleware. That's because the browser cache the login page, so each time the login page i