Re: Django back button issue after log-out
But that means you're going to need to wrap _all_ your views in that structure, and that also means that none of those views will be cacheable.
That could be desirable, depending on your application.
You might also want to consider using @vary_on_cookie, which means that the cache will be specific to that user only for the current cookie values. a "logout" will clear the session cookies, and thus the cache is invalid.
On Monday, December 17, 2012 6:07:49 AM UTC-8, Ashish Sable wrote:
-- On Monday, December 17, 2012 6:07:49 AM UTC-8, Ashish Sable wrote:
yup... Got the solution just the bower cache needs to be cleared.
from django.views.decorators.cache import cache_control
@cache_control(no_cache=True, must_revalidate=True, no_store=True)
def view():
After logout it will render to login page.
On Monday, 17 December 2012 18:39:25 UTC+5:30, ke1g wrote:On Mon, Dec 17, 2012 at 5:14 AM, Ashish Sable <ashish...@gmail.com> wrote:
I have written simple registration(login,logout) Django apps.
when i click on logout and then back button from browser
it shows me previous page. it should redirect me to login page. please help
The back button in your browser just shows you cached stuff. It doesn't contact the server, so there is nothing Django can do.
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/h2MT1GlK_sMJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home