summaryrefslogtreecommitdiff
path: root/django/contrib/sitemaps/views.py
AgeCommit message (Collapse)Author
2025-02-18Refs #36005 -- Used datetime.UTC alias instead of datetime.timezone.utc.Mariusz Felisiak
datetime.UTC was added in Python 3.11.
2023-02-01Refs #33476 -- Applied Black's 2023 stable style.David Smith
Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0
2023-01-17Refs #25916 -- Removed SitemapIndexItem.__str__() per deprecation timeline.Mariusz Felisiak
2022-03-24Refs #32365 -- Removed internal uses of utils.timezone.utc alias.Carlton Gibson
Remaining test case ensures that uses of the alias are mapped canonically by the migration writer.
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-10-21Fixed #25916 -- Added lastmod support to sitemap index view.David Smith
Co-authored-by: Matthew Downey <matthew.downey@webit.com.au>
2021-05-12Fixed #32366 -- Updated datetime module usage to recommended approach.Nick Pope
- Replaced datetime.utcnow() with datetime.now(). - Replaced datetime.utcfromtimestamp() with datetime.fromtimestamp(). - Replaced datetime.utctimetuple() with datetime.timetuple(). - Replaced calendar.timegm() and datetime.utctimetuple() with datetime.timestamp().
2020-09-14Fixed #31789 -- Added a new headers interface to HttpResponse.Tom Carrick
2017-05-27Added comments to contrib.sitemaps.index() view.Boris Burkov
2016-01-23Fixed #25989 -- Corrected sitemap's Last-Modified header to use the latest ↵Alexander Rudakov
lastmod of all sitemaps. Previously, the lastmod of the last sitemap was always used. All sitemaps are required to have a lastmod.
2015-12-31Fixed #26013 -- Moved django.core.urlresolvers to django.urls.Marten Kenbeek
Thanks to Tim Graham for the review.
2015-04-18Removed cases of six.iter* wrapped in a list()Curtis Maloney
There's absolutely no advantage [and a mild performance hit] to using six.iter* in these cases.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2014-09-11Fixed #23403 -- Fixed crash in contrib.sitemaps if lastmod returned a date ↵Tim Graham
rather than datetime. Thanks igorcc for the report.
2014-01-26Moved RequestSite and get_current_site.Aymeric Augustin
Following the app-loading refactor, these objects must live outside of django.contrib.sites.models because they must be available without importing the django.contrib.sites.models module when django.contrib.sites isn't installed. Refs #21680. Thanks Carl and Loic for reporting this issue.
2013-11-02More attacking E302 violatorsAlex Gaynor
2013-10-21Fixed #21288 -- Fixed E126 pep8 warningsAlasdair Nicol
2013-10-15Fixed #7603 -- Added a 'scheme' property to the HttpRequest objectUnai Zalakain
`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-07-31Fixed #20793 -- Added Last-Modified header to sitemaps.Julian Bez
2013-06-29More import removalsClaude Paroz
Following the series of commits removing deprecated features in Django 1.7, here are some more unneeded imports removed and other minor cleanups.
2013-06-28Removed 'mimetype' arguments from a few places, as per deprecation TL.Ramiro Morales
This includes HttpResponse and co. __init__() methods, django.shortcuts.render_to_response() and the index(), sitemap() sitemap app views.
2013-05-04One more changed import location of wrapsClaude Paroz
2013-05-04Fixed #18351 -- Added X-Robots-Tag header to sitemapsClaude Paroz
Thanks Michael Lissner for the report and initial patch, and Tom Mortimer-Jones for working on the patch.
2013-01-31Fixed #19692 -- Completed deprecation of mimetype in favor of content_type.Aymeric Augustin
Thanks Tim for the report and initial patch.
2012-08-07[py3] Fixed access to dict keys/values/items.Aymeric Augustin
2012-01-29Fixed #8995 -- Added support for HTTPS in sitemaps.Aymeric Augustin
Modularized tests and did a bit of cleanup while I was in the area. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17409 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-29Fixed #2713 -- Made the name of the sitemap view a parameter of the sitemap ↵Aymeric Augustin
index view, in order to allow decorators. Also cleaned up code in the area and removed redundant comments from the tests. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17408 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17Converted some of the built-in views to use content_type instead of mimetype ↵Adrian Holovaty
HttpResponse argument. Refs #16519 git-svn-id: http://code.djangoproject.com/svn/django/trunk@17223 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-13Fixed #16225 -- Removed unused imports. Many thanks to Aymeric Augustin for ↵Jannis Leidel
the work on the patch and Alex for reviewing. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-28Fixed #16175 -- Modified the sitemaps views to return TemplateResponse ↵Jannis Leidel
instances for easier customization. Thanks, mat. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16476 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-28Fixed #12347 -- Added a mimetype option to sitemaps views to further ↵Jannis Leidel
customize the output of the view, e.g. to support Yahoo's plain text urllist format. Thanks, afurlan. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16475 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-28Fixed #10907, #14190 and #15829 -- Pass item to sitemaps template to allow ↵Jannis Leidel
further customization like Google News enabled sitemaps. Thanks, manfre and lakinwecker. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16474 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-12Fixed #14041 -- Added ability to override the template of the sitemaps ↵Jannis Leidel
views. Thanks, julien. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14883 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11Fixed #14433 - replaced a thread-unsafe solution to #10235 introduced in [13980]Luke Plant
This patch also addresses sitemap code found in contrib/gis, which [13980] did not. Thanks to gabrielhurley for the initial patch. Refs #10235, #14386 git-svn-id: http://code.djangoproject.com/svn/django/trunk@14141 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-04Fixed #14386, #8960, #10235, #10909, #10608, #13845, #14377 - standardize ↵Luke Plant
Site/RequestSite usage in various places. Many thanks to gabrielhurley for putting most of this together. Also to bmihelac, arthurk, qingfeng, hvendelbo, petr.pulc@s-cape.cz, Hraban for reports and some initial patches. The patch also contains some whitespace/PEP8 fixes. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13980 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-26Fixed #7793 -- Handle sitemaps with more than 50,000 URLs in them (by usingMalcolm Tredinnick
pagination). Patch from Julian Bez. The docs patch here could probably do with some rewording. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8088 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-04Merged Unicode branch into trunk (r4952:5608). This should be fullyMalcolm Tredinnick
backwards compatible for all practical purposes. Fixed #2391, #2489, #2996, #3322, #3344, #3370, #3406, #3432, #3454, #3492, #3582, #3690, #3878, #3891, #3937, #4039, #4141, #4227, #4286, #4291, #4300, #4452, #4702 git-svn-id: http://code.djangoproject.com/svn/django/trunk@5609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-26Fixed #4040 -- Changed uses of has_key() to "in". Slight performanceMalcolm Tredinnick
improvement and forward-compatible with future Python releases. Patch from Gary Wilson. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-02Fixed #2643 -- Fixed incorrect reverse() view names in sitemaps contrib app. ↵Adrian Holovaty
Thanks for the patch, dummy@habmalnefrage.de git-svn-id: http://code.djangoproject.com/svn/django/trunk@3710 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-31Renamed django.contrib.sitemap to django.contrib.sitemaps, to be more ↵Adrian Holovaty
consistent with our plural form for these sorts of things. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3699 bcc190cf-cafb-0310-a4f2-bffc1f526a37