Thank you. The problem with the cache thing. Now resolved.

*Palansh Agarwal | +919461787317 <http://+919461787317/>*
*Co-Founder*, Team Lead IDC,
*GoMobileFirst, USA*
*Systems/Software Dev Intern*, Instaroid <http://instaroid.sg/> , *Bangkok,
Thailand*
Pre Final Year, B.Tech
The LNM Institute of Information Technology, Jaipur, India
[image: https://www.facebook.com/palansh.agarwal]
<https://www.facebook.com/palansh.agarwal>
<https://in.linkedin.com/in/palansh>  <https://twitter.com/pyg33k>  [image:
https://github.com/py-geek] <https://github.com/py-geek>  [image: palansh]
<http://palanshagarwal.herokuapp.com/>

*See**! it's not hard when you FOCUS*

On Wed, Oct 14, 2015 at 6:11 PM, Andreas Kuhne <[email protected]>
wrote:

> Hi,
>
> You should be able to access the website without logging in? Or do you
> mean that the user has access to protected pages?
>
> If you have added the login_required decorator (
> https://docs.djangoproject.com/en/1.8/topics/auth/default/#the-login-required-decorator)
> on your view functions that shouldn't be possible. However the cached
> version of the page should still be accessible (by clicking back). That is
> per design (the client side caches the page). You can prevent this by using
> cache decorators:
> http://stackoverflow.com/questions/6923027/disable-browser-back-button-after-logout
>
> Regards,
>
> Andréas
>
> 2015-10-14 11:07 GMT+02:00 palansh agarwal <[email protected]>:
>
>> Hi,
>>
>> I am trying to implement logout for users in my app. My problem is : When
>> a user logs out and clicks back button in browser he is able to access the
>> website again without logging in.
>>
>> My current code for logout function is-->
>>
>> def logout_user(request):
>>>     del request.session['userid']
>>>     logout(request)
>>>     return render_to_response('index.html')
>>>
>>
>> Any help will be appreciated.
>>
>> Regards,
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/183577c1-57b8-47be-9308-19205cb11bd9%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/183577c1-57b8-47be-9308-19205cb11bd9%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CALXYUbn5UdQUfU%2BWpt_-_iQLRreHvre_EPkoHnu75oA6y8pjjA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CALXYUbn5UdQUfU%2BWpt_-_iQLRreHvre_EPkoHnu75oA6y8pjjA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPCyp%2B9Z-kta%2Bk5xpc7z_p94uDKD8FYgWAo-rWB7eaibsPs%3DTg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to