Ticket #6119: 6119.docs.request_response.diff

File 6119.docs.request_response.diff, 806 bytes (added by Pete Crosier, 17 years ago)

Adds a short description of request.get_host() - second version

  • docs/request_response.txt

     
    156156   Returns ``True`` or ``False``, designating whether ``request.GET`` or
    157157   ``request.POST`` has the given key.
    158158
     159``get_host()``
     160   **New in Django development version**
     161
     162   Returns the originating host of the request by checking ``request.META`` for ``HTTP_X_FORWARDED_HOST``, then ``HTTP_HOST``, then by using a combination of ``SERVER_NAME`` and ``SERVER_PORT`` as detailed in `PEP 333`_.
     163
     164   .. _`PEP 333`: http://www.python.org/dev/peps/pep-0333/
     165
     166   Example: ``"127.0.0.1:8000"``
     167
    159168``get_full_path()``
    160169   Returns the ``path``, plus an appended query string, if applicable.
    161170
Back to Top