summaryrefslogtreecommitdiff
path: root/tests/generic_views
AgeCommit message (Collapse)Author
2026-02-10Modified tests to format PKs with %s rather than %d.Tim Graham
It's how Django formats values internally and makes tests compatible with databases that use non-integer primary keys.
2025-09-22Fixed #36488 -- Fixed merging of query strings in RedirectView.Samriddha9619
Co-authored-by: Ethan Jucovy <ethan.jucovy@gmail.com> Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
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.
2025-07-23Removed double spaces after periods and within phrases.Sarah Boyce
2025-06-06Refs CVE-2025-48432 -- Prevented log injection in remaining response logging.Jake Howard
Migrated remaining response-related logging to use the `log_response()` helper to avoid potential log injection, to ensure untrusted values like request paths are safely escaped. Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2025-02-18Refs #36005 -- Used datetime.UTC alias instead of datetime.timezone.utc.Mariusz Felisiak
datetime.UTC was added in Python 3.11.
2024-12-18Refs #26007 -- Improved the ImproperlyConfigured error message for ↵Andrew Miller
SingleObjectTemplateResponseMixin.get_template_names().
2024-02-05Corrected cache_page()'s timeout value in tests.generic_views.urls.Alexander Lazarević
2023-12-28Removed unnecessary list() calls on sorted().Christian Clauss
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 #33263 -- Removed warning in BaseDeleteView when delete() method is ↵Mariusz Felisiak
overridden.
2022-10-08Refs #33990 -- Renamed TransactionTestCase.assertQuerysetEqual() to ↵Gregor Gärtner
assertQuerySetEqual(). Co-Authored-By: Michael Howitz <mh@gocept.com>
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-11-09Refs #33263 -- Added warning to BaseDeleteView when delete() method is ↵Mariusz Felisiak
overridden. Follow up to 3a45fea0832c5910acee6e0d29f230f347a50462.
2021-10-20Refs #32956 -- Capitalized HTTP/HTTPS in comments, docs, and docstrings.David Smith
2021-10-18Refs #32956 -- Changed docs to treat the acronym HTTP phonetically.David Smith
2021-07-14Fixed #21936 -- Allowed DeleteView to work with custom Forms and ↵Carlton Gibson
SuccessMessageMixin. Thanks to Mariusz Felisiak for review. Co-authored-by: Demetris Stavrou <demestav@gmail.com> Co-authored-by: Caroline Simpson <github@hoojiboo.com>
2021-03-30Fixed #32260 -- Made View.as_view() do not use update_wrapper().Daniyal
View.as_view() should not use update_wrapper() for copying attributes it's unintended and have side-effects such as adding `self` to the signature. This also fixes system check for arguments of custom error handler views with class-based views. Co-authored-by: Nick Pope <nick.pope@flightdataservices.com>
2020-11-06Fixed #31235 -- Made assertQuerysetEqual() compare querysets directly.Hasan Ramezani
This also replaces assertQuerysetEqual() to assertSequenceEqual()/assertCountEqual() where appropriate. Co-authored-by: Peter Inglesby <peter.inglesby@gmail.com> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-09-14Fixed #31789 -- Added a new headers interface to HttpResponse.Tom Carrick
2020-08-24Fixed #31877 -- Reverted "Fixed #19878 -- Deprecated TemplateView passing ↵Mariusz Felisiak
URL kwargs into context." This reverts commit 4ed534758cb6a11df9f49baddecca5a6cdda9311.
2020-08-24Refs #31877 -- Reverted "Fixes #31877 -- Used lazy() for TemplateView kwarg ↵Mariusz Felisiak
deprecation warning." This reverts commit 20799cc0a6d98816b9ef0577e24691bd26b80d7d.
2020-08-13Fixes #31877 -- Used lazy() for TemplateView kwarg deprecation warning.Adam Johnson
SimpleLazyObjects cause a crash when filtering. Thanks Tim L. White for the report. Regression in 4ed534758cb6a11df9f49baddecca5a6cdda9311.
2020-06-26Fixed #31620 -- Added support for %V format to WeekMixin/WeekArchiveView.Hasan Ramezani
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-03-23Fixed #19878 -- Deprecated TemplateView passing URL kwargs into context.Adam Johnson
2020-01-06Removed "Don't do that" from docs and error messages.Adam Johnson
It's slightly aggressive and doesn't explain itself.
2019-10-30Refs #20456 -- Moved initialization of HEAD method based on GET to the ↵Felipe Lee
View.setup() for generic views. This will ease unit testing of views since setup will essentially do everything needed to set the view instance up (other than instantiating it). Credit for idea goes to Vincent Prouillet.
2019-10-30Refs #20456 -- Added test for initialization of request/args/kwargs ↵Felipe Lee
attributes in View.Setup().
2019-06-04Fixed typo in tests/generic_views/test_base.py.Tim Graham
2018-12-21Fixed #29750 -- Added View.setup() hook for class-based views.François Freitag
2018-12-04Tested exception messages in generic_views tests.François Freitag
2018-11-27Made reused RequestFactory instances class attributes.Simon Charette
2018-11-13Moved duplicate author declarations to setUpTestData() in DeleteViewTests.oliver
2018-11-09Moved duplicate author declarations to setUpTestData() in UpdateViewTests.oliver
2018-10-30Increased test coverage of django/views/generic/dates.py.Hasan Ramezani
2018-10-29Fixed #29903 -- Added error message for invalid WeekArchiveView week_format.Hasan Ramezani
2018-10-27Added test coverage for views.generic.dates.MonthMixin.get_month() KeyError ↵Hasan Ramezani
branch.
2018-01-17Improved generic detail view error message for when pk or slug is missing.Vincent Poulailleau
2017-11-07Fixed #28719 -- Added a helpful exception if ↵Bjorn Kristinsson
MultipleObjectTemplateResponseMixin doesn't generate any template names.
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-07-29Used assertRaisesMessage() to test Django's error messages.Mads Jensen
2017-07-06Fixed #28331 -- Added ContextMixin.extra_context to allowing passing context ↵Bruno Alla
in as_view().
2017-06-01Refs #23968 -- Removed unnecessary lists, generators, and tuple calls.Jon Dufresne
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-10Decreased max_length for char fields unless absolutely needed. (#8485)Florian Apolloner
2017-03-01Fixed #26911 -- Removed NoReverseMatch silencing in RedirectView.Grzegorz Tężycki
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand