Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add a delayed redirect to Django page?

Tags:

python

django

I know it's fairly simple to add a redirect to Django with HttpResponseRedirect, but is it possible to make a delayed redirect?

What I want to add is like a confirmation page for the user that will basically say that "Your request has been successful" for 3 seconds and then be taken back to the login page or something.

I've read about JQuery, but as far as I know that's for JavaScript and I want to keep this as Python as possible.

Any ideas?

like image 836
user2090916 Avatar asked Nov 01 '25 01:11

user2090916


1 Answers

You can use a templateView to display your "successful" page then in the template add

<meta http-equiv="refresh" content="3;url=http://foobar.somewhereelse.com/">