SyntaxFix
Write A Post
Hire A Developer
Questions
I know this question is old, but I stumbled upon it looking for a pythonic way to get current domain.
def myview(request): domain = request.build_absolute_uri('/')[:-1] # that will build the complete domain: http://foobar.com