3

Possible Duplicate:
How can I get the full/absolute URL (with domain) in Django?

When I use request.get_full_path(), I get something like

/whatever/path?with=get_too

But I don't get the hostname! I want to get the full URL in order to redirect back to this page from an external page.

Now, I could try something like '%s%s' % (request.get_host(), request.get_full_path()), but if there's something ready-made, that would be better, because then I'd be sure that all the quirks have been worked out of it.

Is there one?

Community
  • 1
  • 1
Ram Rachum
  • 84,019
  • 84
  • 236
  • 374

0 Answers0