Ad Timmering
806efe912b
Fixed #33400 -- Added support for msg_prefix and count arguments to assertTemplateUsed()/assertTemplateNotUsed() used as context managers.
2022-01-05 12:49:42 +01:00
Jamie Matthews
f5233dce30
Fixed #32511 -- Corrected handling prefetched nested reverse relationships.
...
When prefetching a set of child objects related to a set of parent
objects, we usually want to populate the relationship back from the
child to the parent to avoid a query when accessing that relationship
attribute. However, there's an edge case where the child queryset
itself specifies a prefetch back to the parent. In that case, we want
to use the prefetched relationship rather than populating the reverse
relationship from the parent.
2022-01-05 09:49:05 +01:00
Allen Jonathan David
205f67cd5b
Refs #33216 -- Made @deconstructible do not change path for subclasses.
2022-01-04 13:15:29 +01:00
Allen Jonathan David
194ca77092
Refs #21275 -- Added more tests for @deconstructible decorator.
2022-01-04 13:08:36 +01:00
Florian Apolloner
6d343d01c5
Fixed CVE-2021-45452 -- Fixed potential path traversal in storage subsystem.
...
Thanks to Dennis Brinkrolf for the report.
2022-01-04 10:04:12 +01:00
Florian Apolloner
761f449e0d
Fixed CVE-2021-45116 -- Fixed potential information disclosure in dictsort template filter.
...
Thanks to Dennis Brinkrolf for the report.
Co-authored-by: Adam Johnson <me@adamj.eu>
2022-01-04 10:03:56 +01:00
Florian Apolloner
968a3d01fa
Fixed CVE-2021-45115 -- Prevented DoS vector in UserAttributeSimilarityValidator.
...
Thanks Chris Bailey for the report.
Co-authored-by: Adam Johnson <me@adamj.eu>
2022-01-04 10:02:05 +01:00
David Wobrock
482ee63b6f
Fixed #33402 -- Optimized multiple AlterFooTogether operations.
2022-01-04 06:24:03 +01:00
Keryn Knight
0ed2919814
Fixed #33406 -- Avoided creation of MaxLengthValidator(None) when resolving Value.output_field for strings.
...
This brings the behaviour in line with Field subclasses which append to
the validators within __init__(), like BinaryField, and prevents the
creation of a validator which incorrectly throws a TypeError, if it
were used.
2022-01-04 05:51:00 +01:00
Keryn Knight
b894199eb0
Refs #33406 -- Added test for not creating broken validators when resolving Value.output_field.
2022-01-04 05:51:00 +01:00
Mariusz Felisiak
30613d6a74
Fixed #33408 -- Fixed adding nullable unique fields on SQLite.
...
Regression in 2f73e5406d
.
Thanks Alan Crosswell for the report.
2022-01-04 05:50:00 +01:00
Jacob Walls
0ab58c1209
Refs #29026 -- Allowed customizing InteractiveMigrationQuestioner's prompt destination.
...
Previously, the questioner did not obey the value of stdout provided
to the command.
2022-01-03 12:30:51 +01:00
Jacob Walls
03a6488116
Refs #31026 -- Changed @jinja2_tests imports to be relative.
2022-01-03 06:11:30 +01:00
Mariusz Felisiak
826701232c
Removed obsolete Oracle's test_client_encoding() test.
...
encoding and nencoding parameters were deprecated in cx_Oracle 8.2.
Moreover, encoding is handled internally between cx_Oracle and Oracle
Database and there is no need to test it.
2021-12-30 12:42:37 +01:00
Shubh1815
aecfc40c88
Fixed #33300 -- Ensured hidden elements are not displayed on small screens.
2021-12-30 07:57:36 +01:00
Jacob Walls
92412aa94c
Fixed #23273 -- Avoided creation of django_migrations table when there are no migrations to apply.
2021-12-30 06:36:55 +01:00
David Smith
950d697b95
Refs #31617 -- Removed redundant title text in filter.html.
...
Unnecessary since 269a767146
.
Title text should provide advisory information and should not be the
same or very similar to the element text.
2021-12-28 13:42:35 +01:00
Mariusz Felisiak
2d07e1aaeb
Refs #22983 -- Added tests for squashing migrations with functions from migration files.
...
Follow up to ebb13bbd88
.
2021-12-27 18:49:19 +01:00
Hannes Ljungberg
59a66f0512
Refs #33342 -- Deprecated ExclusionConstraint.opclasses.
2021-12-27 08:55:18 +01:00
Hannes Ljungberg
0e656c02fe
Fixed #33342 -- Added support for using OpClass() in exclusion constraints.
2021-12-24 11:39:00 +01:00
Adam Johnson
deec15a9a6
Refs #33355 -- Made trunc functions raise ValueError on invalid lookups on SQLite.
...
Co-Authored-By: Nick Pope <nick@nickpope.me.uk>
2021-12-23 11:47:13 +01:00
David
cb82ded4b2
Refs #32339 -- Added rendering tests for forms with CheckboxSelectMultiple and SelectMultiple widgets.
2021-12-23 07:38:05 +01:00
Mariusz Felisiak
ca04659b4b
Refs #32355 -- Bumped required psycopg2 version to 2.8.4.
...
psycopg2 2.8.4 is the first release to support Python 3.8.
2021-12-22 20:32:55 +01:00
Adam Johnson
a8fa3e5cd7
Refs #33355 -- Added missing tests for database functions and expression on null values.
2021-12-22 11:46:18 +01:00
Baptiste Mispelon
e95e6425ac
Refs #24121 -- Added __repr__() to BaseFormSet.
2021-12-21 12:06:05 +01:00
Baptiste Mispelon
61b332499d
Used assertRaisesMessage() in test_client_regress.AssertFormErrorTests.
2021-12-21 11:09:45 +01:00
David Wobrock
72b23c04d8
Fixed #33374 -- Fixed ExpressionWrapper annotations with full queryset.
2021-12-21 06:17:04 +01:00
Jacob Walls
03cadb912c
Removed a Python error message dependency in test_questioner_no_default_bad_user_entry_code().
2021-12-20 11:11:39 +01:00
Jacob Walls
1833a9eee9
Increased test coverage of django.db.migrations.questioner.
2021-12-20 11:11:39 +01:00
Alexander Filimonov
448145092c
Refs #27674 -- Added tests for GISModelAdmin.gis_widget_kwargs.
2021-12-20 08:12:12 +01:00
mendespedro
e8b4feddc3
Fixed #33367 -- Fixed URLValidator crash in some edge cases.
2021-12-20 07:30:22 +01:00
mendespedro
4fd3044ca0
Fixed #33368 -- Fixed parse_duration() crash on invalid separators for decimal fractions.
2021-12-20 06:46:34 +01:00
Simon Charette
4328970780
Fixed #33366 -- Fixed case handling with swappable setting detection in migrations autodetector.
...
The migration framework uniquely identifies models by case insensitive
labels composed of their app label and model names and so does the app
registry in most of its methods (e.g. AppConfig.get_model) but it
wasn't the case for get_swappable_settings_name() until this change.
This likely slipped under the radar for so long and only regressed in
b9df2b74b9
because prior to the changes
related to the usage of model states instead of rendered models in the
auto-detector the exact value settings value was never going through a
case folding hoop.
Thanks Andrew Chen Wang for the report and Keryn Knight for the
investigation.
2021-12-17 07:46:58 +01:00
Mariusz Felisiak
40165eecc4
Fixed #33350 -- Reallowed using cache decorators with duck-typed HttpRequest.
...
Regression in 3fd82a6241
.
Thanks Terence Honles for the report.
2021-12-16 20:13:17 +01:00
mgaligniana
068b2c072b
Fixed #30127 -- Deprecated name argument of cached_property().
2021-12-16 18:52:27 +01:00
Mariusz Felisiak
882647a82c
Used subTest() in forms.URLField() tests.
2021-12-16 06:35:44 +01:00
mgaligniana
ac5cc6cf01
Fixed #33316 -- Added pagination to admin history view.
2021-12-15 10:54:08 +01:00
Jacob Walls
76ccce64cc
Fixed #16063 -- Adjusted admin changelist searches spanning multi-valued relationships.
...
This reduces the likelihood of admin searches issuing queries with
excessive joins.
2021-12-15 08:14:19 +01:00
Florian Apolloner
e1d673c373
Fixed unescape_string_literal() crash on empty strings.
2021-12-14 20:19:44 +01:00
Florian Apolloner
5d9c512e5b
Added test for ValueErrors in unescape_string_literal().
2021-12-14 20:18:43 +01:00
mdalp
3b73f77ad4
Fixed #33358 -- Fixed handling timedelta < 1 day in schema operations on Oracle.
2021-12-14 09:08:25 +01:00
Jeremy Lainé
2f33217ea2
Fixed #33361 -- Fixed Redis cache backend crash on booleans.
2021-12-14 07:16:30 +01:00
Jeremy Lainé
c7902612ca
Refs #33361 -- Added Added DummyCache.set() test for boolean values.
2021-12-14 06:47:37 +01:00
mgaligniana
e61abab6e0
Refs #33338 -- Added never_cache() tests for Expires header.
2021-12-13 15:32:24 +01:00
Adam Johnson
5111b636d9
Refs #33355 -- Fixed Trunc() with years < 1000 on SQLite.
...
Thanks to Nick Pope for spotting the bug in Code Review.
Co-Authored-By: Nick Pope <nick@nickpope.me.uk>
2021-12-13 11:50:45 +01:00
Mariusz Felisiak
c66ecc5568
Refs #33355 -- Moved Trunc() assertions for invalid arguments and ISO 8601 week to separate tests.
2021-12-13 11:28:35 +01:00
mendespedro
75485d16a2
Fixed #33351 -- Made path()/re_path() raise TypeError when kwargs argument is not a dict.
2021-12-13 08:09:28 +01:00
Mariusz Felisiak
2f73e5406d
Refs #32502 -- Avoided table rebuild when adding fields with no default on SQLite.
2021-12-10 17:13:05 +01:00
Adam Johnson
0d2435328a
Added test for field names of ManagementForm.
2021-12-10 10:01:33 +01:00
Mariusz Felisiak
974e3b8750
Fixed inspectdb.tests.InspectDBTestCase.test_custom_fields() on SQLite 3.37+.
...
Use FlexibleFieldLookupDict which is case-insensitive mapping because
SQLite 3.37+ returns some data type names upper-cased e.g. TEXT.
2021-12-09 20:24:38 +01:00