Skip to content
Advertisement

Obtaining full requested url address

I’m looking to obtain the full requested url within python/django. I’m wondering what package might help me do this.

For example, if someone goes to example.com/my-homepage, I want to capture the string ‘example.com/my-homepage’ in python.

Thanks!

Advertisement

Answer

host = request.build_absolute_uri()
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement