Mariusz Felisiak
b626c5a979
Removed unnecessary str type from @keep_lazy decorator for escape()/escapejs().
2022-02-21 09:46:39 +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
Matthias Kestenholz
a94ae4cb11
Refs #27468 -- Updated django.core.signing docstring.
...
Follow up to 71c4fb7beb
.
2022-02-17 10:01:41 +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
Collin Anderson
35c2474f16
Made Field.error_messages a cached property.
...
This speeds up field creation and reduces memory usage.
2022-02-16 20:30:04 +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
Keryn Knight
1d071ec1aa
Removed unused Node.__iter__().
2022-02-16 08:08:46 +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
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
David
cda81b79f2
Refs #32568 -- Optimized escape() by using SafeString instead of mark_safe().
2022-02-10 06:39:02 +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
dr-rompecabezas
e3f34b1f09
Fixed typo in django/contrib/humanize/templatetags/humanize.py comment.
2022-02-08 07:24:44 +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
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
Hrushikesh Vaidya
832adb31f2
Fixed #33473 -- Fixed detecting changes by autoreloader in .py files inside template directories.
2022-02-03 11:22:45 +01:00
Mariusz Felisiak
c5cd878382
Refs #33476 -- Refactored problematic code before reformatting by Black.
...
In these cases Black produces unexpected results, e.g.
def make_random_password(
self,
length=10,
allowed_chars='abcdefghjkmnpqrstuvwxyz' 'ABCDEFGHJKLMNPQRSTUVWXYZ' '23456789',
):
or
cursor.execute("""
SELECT ...
""",
[table name],
)
2022-02-03 11:20:46 +01:00
Keryn Knight
84418ba3e3
Fixed #33474 -- Added __slots__ to Variable and FilterExpression.
2022-02-02 15:22:46 +01:00
Simon Charette
b7d1da5a62
Fixed #33482 -- Fixed QuerySet filtering againts negated Exists() with empty queryset.
...
Thanks Tobias Bengfort for the report.
2022-02-02 07:54:19 +01:00
Mariusz Felisiak
ca88caa103
Refs #33476 -- Used vertical hanging indentation for format lists with inline comments.
...
Lists with multiple values and comments per-line are reformatted
by Black to multiple lines with a single comment. For example:
DATE_INPUT_FORMATS =
"%Y-%m-%d", "%m/%d/%Y", "%m/%d/%y", # '2006-10-25', '10/25/2006', '10/25/06'
]
is reformatted to the:
DATE_INPUT_FORMATS =
"%Y-%m-%d",
"%m/%d/%Y",
"%m/%d/%y", # '2006-10-25', '10/25/2006', '10/25/06'
]
This reformats affected entries to multiple lines with corresponding
comments.
2022-02-01 15:11:35 +01:00
tschilling
0dcd549bbe
Fixed #30360 -- Added support for secret key rotation.
...
Thanks Florian Apolloner for the implementation idea.
Co-authored-by: Andreas Pelme <andreas@pelme.se>
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
Co-authored-by: Vuyisile Ndlovu <terrameijar@gmail.com>
2022-02-01 11:12:24 +01:00
Mariusz Felisiak
fc18f36c4a
Fixed CVE-2022-23833 -- Fixed DoS possiblity in file uploads.
...
Thanks Alan Ryan for the report and initial patch.
2022-02-01 07:41:40 +01:00
Markus Holtermann
394517f078
Fixed CVE-2022-22818 -- Fixed possible XSS via {% debug %} template tag.
...
Thanks Keryn Knight for the report.
Co-authored-by: Adam Johnson <me@adamj.eu>
2022-02-01 07:40:51 +01:00
Kirill Safronov
97a7274468
Fixed #33480 -- Fixed makemigrations crash when renaming field of renamed model.
...
Regression in aa4acc164d
.
2022-02-01 07:01:41 +01:00
Mariusz Felisiak
71e7c8e737
Fixed #33468 -- Fixed QuerySet.aggregate() after annotate() crash on aggregates with default.
...
Thanks Adam Johnson for the report.
2022-01-31 11:33:24 +01:00
Claude Paroz
beb7ddbcee
Updated translations from Transifex.
...
Updated Bulgarian, Czech, German, Uzbek, and Vietnamese translations.
Forwardport of 7a1c6533eb
from stable/4.0.x.
2022-01-29 19:01:15 +01:00
Keryn Knight
55022f75c1
Fixed #33465 -- Added empty __slots__ to SafeString and SafeData.
...
Despite inheriting from the str type, every SafeString instance gains
an empty __dict__ due to the normal, expected behaviour of type
subclassing in Python.
Adding __slots__ to SafeData is necessary, because otherwise inheriting
from that (as SafeString does) will give it a __dict__ and negate the
benefit added by modifying SafeString.
2022-01-29 13:50:34 +01:00
Mariusz Felisiak
67db54a5a7
Fixed #33452 -- Fixed admin change-form layout for submit buttons on mid-sized displays.
...
Thanks David Smith for reviews.
2022-01-29 11:59:08 +01:00
Keryn Knight
c5c7a15b09
Fixed #33461 -- Escaped template errors in the technical 500 debug page.
2022-01-28 07:07:12 +01:00
vgolubev
e87f57fdb8
Fixed #26142 -- Allowed model formsets to prevent new object creation.
...
Thanks Jacob Walls, David Smith, and Mariusz Felisiak for reviews.
Co-authored-by: parth <parthvin@gmail.com>
2022-01-27 20:45:21 +01:00
Jörg Breitbart
0af9a5fc7d
Fixed #33463 -- Fixed QuerySet.bulk_update() with F() expressions.
2022-01-27 19:03:26 +01:00
Mariusz Felisiak
e972620ada
Fixed #33462 -- Fixed migration crash when altering type of primary key with MTI and foreign key.
...
This prevents duplicated operations when altering type of primary key
with MTI and foreign key. Previously, a foreign key to the base model
was added twice, once directly and once by the inheritance model.
Thanks bcail for the report.
Regression in 325d7710ce
.
2022-01-27 18:51:39 +01:00
Mariusz Felisiak
2eed554c3f
Fixed wrapping of long messages in the admin.
2022-01-26 21:14:13 +01:00
Carlton Gibson
85f2a9fb0f
Fixed #33407 -- Fixed .radiolist admin CSS.
...
Regression in 5942ab5eb1
.
2022-01-26 09:26:48 +01:00
Ian Foote
a93a1ba347
Fixed broken link to cx_Oracle docs.
2022-01-25 20:14:24 +01:00