summaryrefslogtreecommitdiff
path: root/django/views/generic/dates.py
AgeCommit message (Collapse)Author
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2024-10-15Fixed #35682 -- Updated docstrings for base view classes which require a ↵Yash
response mixin.
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2020-06-26Fixed #31620 -- Added support for %V format to WeekMixin/WeekArchiveView.Hasan Ramezani
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2019-06-28Fixed #30400 -- Improved typography of user facing strings.Jon Dufresne
Thanks Claude Paroz for assistance with translations.
2018-10-29Fixed #29903 -- Added error message for invalid WeekArchiveView week_format.Hasan Ramezani
2018-01-18Refs #23668 -- Removed passing default argument of current TZ to ↵Jon Dufresne
make_aware()/naive.
2017-12-04Fixed #28860 -- Removed unnecessary len() calls.Дилян Палаузов
2017-09-20Fixed #28593 -- Added a simplified URL routing syntax per DEP 0201.Sjoerd Job Postmus
Thanks Aymeric Augustin for shepherding the DEP and patch review. Thanks Marten Kenbeek and Tim Graham for contributing to the code. Thanks Tom Christie, Shai Berger, and Tim Graham for the docs.
2017-09-04Fixed #28082 -- Made BaseDateListView pass context from get_dated_items() to ↵Sebastian Sassi
subclasses. Thanks leon-matthews for the report and fix.
2017-05-30Fixed #28209 -- Made date-based generic views return a 404 rather than crash ↵Adit Biswas
when given an out of range date.
2017-05-27Fixed #28226 -- Replaced use of str.join() with concatenation.Tom
2017-03-04Refs #27795 -- Removed unneeded force_text callsClaude Paroz
Thanks Tim Graham for the review.
2017-03-03Refs #27656 -- Updated django.views docstring verbs according to PEP 257.Anton Samarchyan
2017-02-07Converted usage of ugettext* functions to their gettext* aliasesClaude Paroz
Thanks Tim Graham for the review.
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-20Refs #23919 -- Removed unneeded force_str callsClaude Paroz
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-08-31Fixed #25181 -- Added localdate() function to get date in a different time zone.Jon Dufresne
Thanks Konrad Świat for the original patch.
2016-02-05Fixed #26176 -- Fixed E123 flake8 warnings.Tim Graham
2015-08-31Fixed #25331 -- Removed trailing blank lines in docstrings.Maxime Lorant
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-02-03Fixed #24263 -- Prevented extra queries on BaseDateDetailView with a custom ↵Tim Graham
queryset. Thanks jekka-ua for the report and patch.
2014-11-22Fix another flake8 warning.Carl Meyer
I don't agree with flake8 here about the right indentation, but as long as we're using it, we should stick to it. I don't want to disable its hanging indent checks just because of this case.
2014-09-05Limited lines to 119 characters in django/Tim Graham
refs #23395.
2014-08-15Fixed #18355 -- Added ordering options to list based generic views.Peter Harley
Added MultipleObjectMixin.ordering and get_ordering(). Refs #21450.
2014-04-26Fix many many typos in comments throughout the codebaseAlex Gaynor
2014-01-10Fixed typo in docstrings of MonthArchiveViews.Michael Blatherwick
2013-11-02Correct flake8 E302 violationsRay Ashman Jr
2013-10-21Fixed #21288 -- Fixed E126 pep8 warningsAlasdair Nicol
2013-02-16Fixed #17260 -- Added time zone aware aggregation and lookups.Aymeric Augustin
Thanks Carl Meyer for the review. Squashed commit of the following: commit 4f290bdb60b7d8534abf4ca901bd0844612dcbda Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Wed Feb 13 21:21:30 2013 +0100 Used '0:00' instead of 'UTC' which doesn't always exist in Oracle. Thanks Ian Kelly for the suggestion. commit 01b6366f3ce67d57a58ca8f25e5be77911748638 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Wed Feb 13 13:38:43 2013 +0100 Made tzname a parameter of datetime_extract/trunc_sql. This is required to work around a bug in Oracle. commit 924a144ef8a80ba4daeeafbe9efaa826566e9d02 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Wed Feb 13 14:47:44 2013 +0100 Added support for parameters in SELECT clauses. commit b4351d2890cd1090d3ff2d203fe148937324c935 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Mon Feb 11 22:30:22 2013 +0100 Documented backwards incompatibilities in the two previous commits. commit 91ef84713c81bd455f559dacf790e586d08cacb9 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Mon Feb 11 09:42:31 2013 +0100 Used QuerySet.datetimes for the admin's date_hierarchy. commit 0d0de288a5210fa106cd4350961eb2006535cc5c Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Mon Feb 11 09:29:38 2013 +0100 Used QuerySet.datetimes in date-based generic views. commit 9c0859ff7c0b00734afe7fc15609d43d83215072 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 21:43:25 2013 +0100 Implemented QuerySet.datetimes on Oracle. commit 68ab511a4ffbd2b811bf5da174d47e4dd90f28fc Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 21:43:14 2013 +0100 Implemented QuerySet.datetimes on MySQL. commit 22d52681d347a8cdf568dc31ed032cbc61d049ef Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 21:42:29 2013 +0100 Implemented QuerySet.datetimes on SQLite. commit f6800fd04c93722b45f9236976389e0b2fe436f5 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 21:43:03 2013 +0100 Implemented QuerySet.datetimes on PostgreSQL. commit 0c829c23f4cf4d6804cadcc93032dd4c26b8c65e Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 21:41:08 2013 +0100 Added datetime-handling infrastructure in the ORM layers. commit 104d82a7778cf3f0f5d03dfa53709c26df45daad Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Mon Feb 11 10:05:55 2013 +0100 Updated null_queries tests to avoid clashing with the __second lookup. commit c01bbb32358201b3ac8cb4291ef87b7612a2b8e6 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 23:07:41 2013 +0100 Updated tests of .dates(). Replaced .dates() by .datetimes() for DateTimeFields. Replaced dates with datetimes in the expected output for DateFields. commit 50fb7a52462fecf0127b38e7f3df322aeb287c43 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 21:40:09 2013 +0100 Updated and added tests for QuerySet.datetimes. commit a8451a5004c437190e264667b1e6fb8acc3c1eeb Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 22:34:46 2013 +0100 Documented the new time lookups and updated the date lookups. commit 29413eab2bd1d5e004598900c0dadc0521bbf4d3 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 16:15:49 2013 +0100 Documented QuerySet.datetimes and updated QuerySet.dates.
2013-01-26Fixed #16123 -- Ensured strptime receive proper string typeClaude Paroz
strptime generates an UnicodeEncodeError when using a non-ascii unicode string on Python 2.
2012-09-22Fixed #16218 -- date_list order in generic CBVs.Aymeric Augustin
Thanks nnrcschmdt for the report and bpeschier for the initial version of the patch.
2012-09-08Updated docs for dates generic views.Aymeric Augustin
Fixes #18245. Refs #3542.
2012-08-18Fixed #3542 -- Add support for changing granularity on ArchiveView.Marc Tamlyn
Resolving the concept from a very old ticket in a more class-based-view manner.
2012-08-07[py3] Ported django.utils.encoding.Aymeric Augustin
* Renamed smart_unicode to smart_text (but kept the old name under Python 2 for backwards compatibility). * Renamed smart_str to smart_bytes. * Re-introduced smart_str as an alias for smart_text under Python 3 and smart_bytes under Python 2 (which is backwards compatible). Thus smart_str always returns a str objects. * Used the new smart_str in a few places where both Python 2 and 3 want a str.
2012-06-11Fixed #18451 -- Vastly improved class based view documentation.Jannis Leidel
Many thanks to Daniel Greenfeld, James Aylett, Marc Tamlyn, Simon Williams, Danilo Bargen and Luke Plant for their work on this.
2012-06-07Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.Claude Paroz
Thanks Vinay Sajip for the support of his django3 branch and Jannis Leidel for the review.
2012-05-24Fixed #18353 -- Inconsistency in date-based CBVs.Aymeric Augustin
2012-05-20Fixed #18354 -- Performance issue in CBV.Aymeric Augustin
Prevented repeating a query twice when the model isn't ordered by -date_field (in Meta), allow_empty is False and pagination isn't enabled.
2012-05-17Fixed #18323 -- Refactored date arithmeticAymeric Augustin
in date based generic views, in order to deal properly with both DateFields and DateTimeFields.
2012-05-17Fixed #17535 -- Optimized list generic views.Aymeric Augustin
When allow_empty is False, prevented the view from loading the entire queryset in memory when pagination is enabled.
2012-05-14Fixed #10890: added prev/next_week in the contextAymeric Augustin
of per-week date-based generic views. Thanks ee_lars for the report.
2012-04-30Fixed #18217 -- Time zone support in generic viewsAymeric Augustin
Introduced a distinct implementation depending on the type of the date field (DateField or DateTimeField), and applied appropriate conversions is the latter case, when time zone support is enabled.
2012-04-30Simplified date-based generic views.Aymeric Augustin
Removed a confusing helper function that was confusing -- it used last_day to store the first day of the next month.
2012-04-10Fixed #18087 -- Prevented date-based generic views from loading entire ↵Aymeric Augustin
tables in memory when pagination is enabled. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17893 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-06Fixed #16074 -- Added ContextMixin to class-based generic views to handle ↵Claude Paroz
get_context_data. Thanks emyller, Luke Plant, Preston Holmes for working on the ticket and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17875 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-20Upgraded the date based generic views to avoid warnings when time zone ↵Aymeric Augustin
support is enabled. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17127 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13Fixed #16918 -- Ensured that custom querysets are used when provided to ↵Julien Phalip
`BaseDateDetailView.get_object()`. Thanks to mitar for the report, to koenb for the patch and to Preston Holmes for the review. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16974 bcc190cf-cafb-0310-a4f2-bffc1f526a37