Django

Code

Changeset 6941

Show
Ignore:
Timestamp:
12/17/07 06:50:06 (9 months ago)
Author:
mtredinnick
Message:

Fixed #6119 -- Documented HttpRequest.get_host(). Thanks, PJCrosier.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/request_response.txt

    r6923 r6941  
    156156   Returns ``True`` or ``False``, designating whether ``request.GET`` or 
    157157   ``request.POST`` has the given key. 
     158 
     159``get_host()`` 
     160   **New in Django development version** 
     161 
     162   Returns the originating host of the request using information from the 
     163   ``HTTP_X_FORWARDED_HOST`` and ``HTTP_HOST`` headers (in that order). If 
     164   they don't provide a value, the method uses a combination of 
     165   ``SERVER_NAME`` and ``SERVER_PORT`` as detailed in `PEP 333`_. 
     166 
     167   .. _PEP 333: http://www.python.org/dev/peps/pep-0333/ 
     168 
     169   Example: ``"127.0.0.1:8000"`` 
    158170 
    159171``get_full_path()``