Django Redirects (Overview)
When you build web applications in Python using the Django framework, you’ll likely need to redirect the user from one URL to another. This course covers what you need to know about redirecting in Django. All the way from the low-level details of the HTTP protocol to the high-level way of dealing with them in Django.
By the end of this course, you’ll learn:
- How HTTP Redirects work
- The difference between temporary and permanent redirects
- How to use query strings with a redirect
- How to avoid common problems
First off, I’ll cover just what an HTTP redirect is, how to use Django’s
redirect() shortcut, how to use Django’s
RedirectView class helper, what to do if your redirects require parameters, and finally, those corner cases and caveats.
00:25 The code in this course was created using Django 3.0 and Python 3.8. Most of the content should apply to earlier versions. Django 2 and Django 3 are fairly compatible. There’s one small exception, which I’ll mention in later lessons.
Become a Member to join the conversation.