django1/django/contrib/sitemaps
Unai Zalakain c7634cd7fe Fixed #7603 -- Added a 'scheme' property to the HttpRequest object
`HttpRequest.scheme` is `https` if `settings.SECURE_PROXY_SSL_HEADER` is
appropriately set and falls back to `HttpRequest._get_scheme()` (a hook
for subclasses to implement) otherwise.

`WSGIRequest._get_scheme()` makes use of the `wsgi.url_scheme` WSGI
environ variable to determine the request scheme.

`HttpRequest.is_secure()` simply checks if `HttpRequest.scheme` is
`https`.

This provides a way to check the current scheme in templates, for example.
It also allows us to deal with other schemes.

Thanks nslater for the suggestion.
2013-10-15 09:04:12 -04:00
..
management Whitespace cleanup. 2013-10-10 16:49:20 -04:00
templates Fixed #8172 -- Improved a whole bunch of contrib templates (admin, databrowse, admindocs, etc.) to remove unnecessary 'escape' filters, given autoescaping. Also removed unnecessary {% if %} tags and shortened some {% if %}/{% else %} tags to use {% firstof %}. Thanks for the patch, benspaulding 2008-09-08 05:19:28 +00:00
tests Fixed #21112 -- Make sure sitemaps with no lastmod date work correctly. 2013-09-17 10:21:11 -04:00
__init__.py Fixed "redefinition of unused 'foo' from line X" pyflakes warnings. 2013-10-10 11:09:42 -04:00
models.py Whitespace cleanup. 2013-10-10 16:49:20 -04:00
views.py Fixed #7603 -- Added a 'scheme' property to the HttpRequest object 2013-10-15 09:04:12 -04:00