Search code examples
djangohttpresponsehttp-response-codes

How to find the location URL in a Django response object?


Let's say I have a Django response object.

I want to find the URL (location). However, the response header does not actually contain a Location or Content-Location field.

How do I determine, from this response object, the URL it is showing?


Solution

  • The response does not decide the url, the request does.

    The response gives you the content of the response, not the url of it.