Detect HttpResponseRedirect and Get Header Data in Django?

Detect HttpResponseRedirect and Get Header Data in Django?

I'm trying to capture an HttpResponseRedirect from a render within a function.

I'm trying to capture an HttpResponseRedirect from a render within a function.

I have some success... but I want to be able to extract the Location.

For Example..

{'content-type': ('Content-Type', 'text/html; charset=utf-8'), 'location': ('Location', '/app/create/preview/')}

Is a response that I'm able to get using

xxx_response._headers

How do I decode this? Can someone please point me in the right direction?

Thank you.

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Python Django Tutorial | Django Course

🔥Intellipaat Django course: https://intellipaat.com/python-django-training/ 👉This Python Django tutorial will help you learn what is django web development &...

Developing Restful APIs with Python, Django and Django Rest Framework

This article is a definitive guide for starters who want to develop projects with RESTful APIs using Python, Django and Django Rest Framework.