Luke Plant
f3bf6c4218
Refs #33562 -- Made HttpResponse.set_cookie() raise ValueError when both "expires" and "max_age" are passed.
...
This fixes the case where you might pass set_cookie(expires=val, max_age=val)
and max_age is silently ignored.
2022-03-07 08:04:18 +01:00
Luke Plant
ae2da5ba65
Fixed #33562 -- Made HttpResponse.set_cookie() support timedelta for the max_age argument.
2022-03-07 07:57:14 +01:00
Luke Plant
1882f6567d
Refs #33562 -- Added tests HttpRequest.get_signed_cookie() with timedeltas.
2022-03-07 07:29:43 +01:00
Ryan Heard
c6b4d62fa2
Fixed #29865 -- Added logical XOR support for Q() and querysets.
2022-03-04 12:55:37 +01:00
Mariusz Felisiak
a46bc327e7
Refs #11293 -- Added test for filtering aggregates with negated & operator.
2022-03-04 09:51:52 +01:00
Adam Johnson
b811364421
Refs #33446 -- Allowed variable whitespace in CSS source map references.
...
Follow up to dc8bb35e39
.
The Webpack default is to output CSS source map comments like
`/*# sourceMappingURL=main.css.map*/`. Also, Chromium allows tabs.
2022-03-04 06:22:28 +01:00
Keryn Knight
9bde906fb2
Refs #10188 -- Added tests for BadHeaderErrors when HTTP header with newlines cannot be encoded/decoded.
2022-03-02 20:23:39 +01:00
Mariusz Felisiak
445b075def
Fixed #33547 -- Fixed error when rendering invalid inlines with readonly fields in admin.
...
Regression in de95c82667
.
Thanks David Glenck for the report.
2022-03-01 08:09:58 +01:00
Hrushikesh Vaidya
119f227aa6
Fixed #33524 -- Allowed overriding empty_label for ForeignKey in ModelAdmin.radio_fields.
2022-02-28 13:28:21 +01:00
Mariusz Felisiak
26c166c3b0
Added test for removing through model from ManyToManyField.
2022-02-25 22:01:27 +01:00
Albert Defler
2b6a3baebe
Fixed #31486 -- Deprecated passing unsaved objects to related filters.
...
Co-Authored-By: Hasan Ramezani <hasan.r67@gmail.com>
2022-02-25 07:51:37 +01:00
Shubh1815
11cc227344
Fixed #33267 -- Added link to related item to related widget wrapper in admin.
2022-02-25 06:33:05 +01:00
Albert Defler
18245b948b
Refs #7488 , Refs #19524 -- Removed obsolete ModelInheritanceTest.test_issue_7488() test.
...
Obsolete since e9c24bef74
.
2022-02-24 09:55:02 +01:00
Anders Kaseorg
7f4fc5cbd4
Fixed #33539 -- Fixed spaces in WITH SQL for indexes on PostgreSQL.
2022-02-24 09:03:58 +01:00
mgaligniana
fe7dbef586
Fixed #28889 -- Prevented double submission of admin forms.
...
Added a JavaScript confirm() to catch double-submissions, when the
change form has already been submitted.
Thanks to Adam Johnson, Claude Paroz, Keryn Knight, and Thibaud Colas
for review.
2022-02-23 14:57:34 +01:00
Mariusz Felisiak
d11944be34
Refs #33476 -- Added warning to optimizemigration/squashmigrations commands when black cannot be applied.
2022-02-23 07:29:15 +01:00
David Wobrock
7c318a8bdd
Fixed #27844 -- Added optimizemigration management command.
2022-02-22 10:30:40 +01:00
Nick Pope
847f46e9bf
Removed redundant QuerySet.all() calls in docs and tests.
...
Most QuerySet methods are mapped onto the Manager and, in general,
it isn't necessary to call .all() on the manager.
2022-02-22 10:29:38 +01:00
Albert Defler
7ba6ebe914
Fixed #19580 -- Unified behavior of reverse foreign key and many-to-many relations for unsaved instances.
2022-02-22 09:16:40 +01:00
nabil-rady
b7f263551c
Refs #33517 -- Prevented __second lookup from returning fractional seconds on PostgreSQL.
2022-02-22 07:26:44 +01:00
Theo Alexiou
659d2421c7
Fixed #20296 -- Prevented mark_safe() from evaluating lazy objects.
2022-02-21 10:11:26 +01:00
Mariusz Felisiak
1299bc33e1
Refs #33526 -- Made CSRF_COOKIE_SECURE/SESSION_COOKIE_SECURE/SESSION_COOKIE_HTTPONLY don't pass on truthy values.
2022-02-21 07:54:47 +01:00
saeedblanchette
e559070a7a
Fixed #33518 -- Added RemovedAfterNextVersionWarning.
2022-02-21 06:23:41 +01:00
David Smith
fac3dd7f39
Refs #33173 -- Fixed MailTests.test_backend_arg() on Windows and Python 3.11+.
2022-02-19 20:36:01 +01:00
Hasan Ramezani
9ac3ef59f9
Fixed #33379 -- Added minimum database version checks.
...
Thanks Tim Graham for the review.
2022-02-18 13:37:49 +01:00
My-Name-Is-Nabil
3079133c73
Fixed #33514 -- Added fallbacks to subsequent language codes in Select2 translations.
2022-02-18 08:34:49 +01:00
Matthias Kestenholz
b2ed0d78f2
Refs #28358 -- Fixed infinite recursion in LazyObject.__getattribute__().
...
Regression in 97d7990abd
.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-authored-by: Theo Alexiou <theofilosalexiou@gmail.com>
2022-02-17 14:52:17 +01:00
Mariusz Felisiak
1e2e1be02b
Fixed #33515 -- Prevented recreation of migration for ManyToManyField to lowercased swappable setting.
...
Thanks Chris Lee for the report.
Regression in 4328970780
.
Refs #23916 .
2022-02-16 21:09:24 +01:00
Theo Alexiou
97d7990abd
Fixed #28358 -- Prevented LazyObject from mimicking nonexistent attributes.
...
Thanks Sergey Fedoseev for the initial patch.
2022-02-16 10:51:15 +01:00
Carlton Gibson
236e6cb588
Refs #31407 -- Handled potential exception in test cleanup.
...
The test view may not be called when running the tests with
--parallel=2 or greater. Catch the AttributeError for this case.
2022-02-15 14:38:19 +01:00
Baptiste Mispelon
f7e0bffa2e
Refs #33348 -- Made SimpleTestCase.assertFormError() raise ValueError when "field" is passed without "form_index".
2022-02-15 10:30:20 +01:00
Mariusz Felisiak
d4c9dab74b
Refs #33348 -- Fixed SimpleTestCase.assertFormError() error message raised for unbound forms.
2022-02-15 10:16:06 +01:00
Baptiste Mispelon
d84cd91e90
Refs #33348 -- Improved messages raised by SimpleTestCase.assertFormError()/assertFormsetErrors().
...
This makes messages use BaseFormSet/BaseForm.__repr__() instead of
context, and adds the _assert_form_error() helper.
2022-02-15 07:15:44 +01:00
Baptiste Mispelon
9bb13def5d
Refs #33348 -- Made SimpleTestCase.assertFormsetErrors() raise an error when form_index is too big.
2022-02-14 12:46:46 +01:00
Baptiste Mispelon
261885e4c1
Simplified SimpleTestCase.assertFormError()/assertFormsetErrors() calls in admin_views tests.
2022-02-14 11:34:58 +01:00
Baptiste Mispelon
1f749d6f12
Fixed field name in admin_views.tests.UserAdminTest.test_password_mismatch() assertion.
2022-02-14 11:29:45 +01:00
Baptiste Mispelon
7986028e3f
Refs #33348 -- Made SimpleTestCase.assertFormError()/assertFormsetErrors() raise an error for unbound forms/formsets.
2022-02-14 08:43:46 +01:00
rafrafek
cdd4ff67d2
Refs #25684 -- Removed double newline from request/response output of runserver.
...
Follow up to 0bc5cd6280
.
2022-02-14 06:55:34 +01:00
Mariusz Felisiak
3702819227
Refs #32502 -- Avoided table rebuild when removing fields on SQLite 3.35.5+.
...
ALTER TABLE ... DROP COLUMN was introduced in SQLite 3.35+ however
a data corruption issue was fixed in SQLite 3.35.5.
2022-02-11 22:21:58 +01:00
Carlton Gibson
d113b5a837
Refs #33476 -- Made management commands use black.
...
Run black on generated files, if it is available on PATH.
2022-02-11 12:23:26 +01:00
Theo Alexiou
f9ec777a82
Fixed #26287 -- Added support for addition operations to SimpleLazyObject.
2022-02-10 11:24:51 +01:00
Claude Paroz
4c76ffc2d6
Fixed #29490 -- Added support for object-based Media CSS and JS paths.
2022-02-10 08:48:27 +01:00
Damian Posener
09e499a39e
Fixed #33501 -- Made order_with_respect_to respect database routers.
2022-02-09 13:31:49 +01:00
Aaron Chong
2d472ad05c
Fixed #33495 -- Improved debug logging message about adapting handlers for middlewares.
...
It's the wrapped handler that's adapted to the wrapping middleware.
2022-02-09 12:10:26 +01:00
Simon Charette
d35ce682e3
Fixed #33506 -- Made QuerySet.bulk_update() perform atomic writes against write database.
...
The lack of _for_write = True assignment in bulk_update prior to
accessing self.db resulted in the db_for_read database being used to
wrap batched UPDATEs in a transaction.
Also tweaked the batch queryset creation to also ensure they are
executed against the same database as the opened transaction under all
circumstances.
Refs #23646 , #33501 .
2022-02-09 11:14:50 +01:00
Mariusz Felisiak
7119f40c98
Refs #33476 -- Refactored code to strictly match 88 characters line length.
2022-02-07 20:37:05 +01:00
django-bot
9c19aff7c7
Refs #33476 -- Reformatted code with Black.
2022-02-07 20:37:05 +01:00
Mariusz Felisiak
f68fa8b45d
Refs #33476 -- Changed quotation marks in DebugViewTests.test_template_exceptions().
...
This prevents a failure after reformatting the code with Black.
2022-02-07 20:36:04 +01:00
Mariusz Felisiak
6f185a53a2
Refs #33482 -- Fixed QuerySet selecting and filtering againts negated Exists() with empty queryset.
...
Regression in b7d1da5a62
.
2022-02-07 20:34:21 +01:00
Carlton Gibson
4b8e9492d9
Refs #32559 -- Added selenium test for FloatField client-side validation.
...
step="any" is required for non-integer values. See:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number#step
Covers behaviour added in 7ec2a21be1
.
2022-02-03 13:50:37 +01:00