finding domain name

Bobby Roberts tchendrix at gmail.com
Tue Sep 23 08:54:30 EDT 2008


> Depends on the technology/web framework. If you use WSGI, you should use
> something like:
>
> host_name = environ.get("HTTP_HOST", None) or environ["SERVER_NAME"]
>
> -- Gerhard

Yeah i already tried environ("SERVER_NAME") but get a key error when i
do.




More information about the Python-list mailing list