To create a complete URL with routes, use the qualified=True keyword in the url() call.
Example:
print url("blog", id=123, qualified=True)
If your web application runs behind a load balancer or reverse proxy server, you may run into problems when the generated URLs point to backend appservers and not to a third-party proxy server. You can use the host argument to fix this:
print url("blog", id=123, qualified=True, host="example.com") # ==> "http://example.com/blog/123"
For more information on settings and settings, see the Routing Guide .
source share