In my django app, I have an authentication system. So, If I do not log in and try to access some profile\'s personal info, I get redirected to a login page.
Now, I
response['Location'] doesn't exist in 1.9. Use this instead:
response['Location']
response = self.client.get('/myprofile/data/some_id/', follow=True) last_url, status_code = response.redirect_chain[-1] print(last_url)