How did you use the never_cache? Because if i just put @never_cache before 
the def of my view: def cadastrarprofessor(request):, it's like it doesn't 
do anything (i am on the login page, I go to the registration page, inform 
a name of a user that already exists, click "register", the system 
refreshes the page telling me that the user already exists and when i press 
the "back button" from the browser, it goes back to the registration page 
with empty fields, which is not what iwant. I want to go back to the login 
page, the page before the registration). Do I have to use @never_cache and 
remove all the return render from my function? What should i return instead?
On Tuesday, October 31, 2017 at 2:46:01 PM UTC-3, Matthew Pava wrote:
>
> I had a similar issue and even tried using sessions, but I eventually 
> found that never_cache worked beautifully for me.  I didn’t have to worry 
> about sessions any more.
>
>  
>
> *From:* django...@googlegroups.com <javascript:> [mailto:
> django...@googlegroups.com <javascript:>] *On Behalf Of *fábio andrews 
> rocha marques
> *Sent:* Tuesday, October 31, 2017 12:19 PM
> *To:* Django users
> *Subject:* Re: do i always have to reload/return render a page to show 
> the errors? if i press go back on browser, i see screens with the error 
> message
>
>  
>
> I found this topic within stackoverflow: 
> https://stackoverflow.com/questions/10906548/django-redirect-behavior-with-back-button
>
>  
>
>  that seems to me that the user was having the same problem as i am. The 
> only answer i found could work was from magicTuscan, but he just said "I 
> would save the last site path as a session, then retrieve via the view when 
> the page is called again via the back button". I've tried to contact him 
> but didn't get an answer. Is it possible to override the "browser back 
> button" behavior on django using sessions?
>
> -- 
> 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 django-users...@googlegroups.com <javascript:>.
> To post to this group, send email to djang...@googlegroups.com 
> <javascript:>.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/3ad05d02-cecd-4560-9654-82d2ed1106ca%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/django-users/3ad05d02-cecd-4560-9654-82d2ed1106ca%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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fa86e291-ad2e-4b5a-b78a-1e98327189ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to