Django | capture sub domain as a string

Posted by MMRUser on Stack Overflow See other posts from Stack Overflow or by MMRUser
Published on 2010-06-02T17:44:21Z Indexed on 2010/06/02 18:04 UTC
Read the original article Hit count: 236

Filed under:

How do I capture a part of sub-domain name and get that name as a string in my views through a request.

ex:

user.domain.com
developer.domain.com

I want to capture the user part of this domain name through a request (lets say when the first time user hits the page).

Thanks.

© Stack Overflow or respective owner

Related posts about django