The request object has a .host
attribute, but that includes the port number, if available. To get just the host name or IP address, try:
{{ request.host.split(':')[0] }}
Alternatively, you could query the WSGI environment directly:
{{ request.environ['SERVER_NAME'] }}