At least in newer versions of Django I think this information is already stored on the request object?
Little cautious about introducing this as it currently stands as a single view might output a lot of URLs, all of which will now cause URL resolving.