1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00
Commit Graph

31764 Commits

Author SHA1 Message Date
rajeeshp
a2da81fe08 Fixed #34578 -- Made "join" template filter respect autoescape for joiner. 2023-05-19 13:16:42 +02:00
Adam Johnson
fce90950be
Refs 34343 -- Removed outdated comment about inline template from CSRF view file. 2023-05-18 14:17:21 -03:00
HappyDingning
674c23999c Fixed #34565 -- Added support for async checking of user passwords. 2023-05-18 09:39:04 +02:00
Adam Johnson
4e73d8c04d Avoided parallel assignment in template classes. 2023-05-18 05:57:28 +02:00
Carlton Gibson
4a5753fb0a
Refs #32339 -- Fixed super() call in deprecated renderers.
Missing function call `()` leads to:

TypeError: descriptor '__init__' of 'super' object needs an argument

Regression in b209518089.
2023-05-17 11:11:43 -03:00
Mariusz Felisiak
c52f4295f2
Fixed #34568 -- Made makemigrations --update respect --name option.
Thanks David Sanders for the report.
2023-05-17 13:14:43 +02:00
Mariusz Felisiak
93830abf76
Updated broken links in docs. 2023-05-17 12:13:10 +02:00
Simon Charette
99e5dff737 Fixed #34570 -- Silenced noop deferral of many-to-many and GFK.
While deferring many-to-many and GFK has no effect, the previous
implementation of QuerySet.defer() ignore them instead of crashing.

Regression in b3db6c8dcb.

Thanks Paco Martínez for the report.
2023-05-17 08:06:11 +02:00
Julie Rymer
0ec60661e6 Fixed #34539 -- Restored get_prep_value() call when adapting JSONFields.
Regression in 5c23d9f0c3.
2023-05-16 08:26:41 +02:00
Ian Foote
7414704e88 Fixed #470 -- Added support for database defaults on fields.
Special thanks to Hannes Ljungberg for finding multiple implementation
gaps.

Thanks also to Simon Charette, Adam Johnson, and Mariusz Felisiak for
reviews.
2023-05-12 19:11:40 +02:00
Alexerson
599f3e2cda
Fixed #34556 -- Doc'd that StreamingHttpResponse accepts memoryviews and strings iterators. 2023-05-12 10:34:47 -03:00
Alberto Sottile
e901407e23
Clarified database connections lifetime outside HTTP requests. 2023-05-12 08:09:38 -03:00
Mariusz Felisiak
72a86ceb33
Fixed #34558 -- Fixed QuerySet.bulk_create() crash with Now() on Oracle. 2023-05-11 18:22:55 +02:00
nessita
2b11740e1d
Made explicit the location of locally-built HTML docs. 2023-05-11 07:55:45 -03:00
Simon Charette
ffff17d4b0 Fixed #34553 -- Fixed improper % escaping of literal in constraints.
Proper escaping of % in string literals used when defining constaints
was attempted (a8b3f96f6) by overriding quote_value of Postgres and
Oracle schema editor. The same approach was used when adding support for
constraints to the MySQL/MariaDB backend (1fc2c70).

Later on it was discovered that this approach was not appropriate and
that a preferable one was to pass params=None when executing the
constraint creation DDL to avoid any form of interpolation in the first
place (42e8cf47).

When the second patch was applied the corrective of the first were not
removed which caused % literals to be unnecessary doubled. This flew
under the radar because the existings test were crafted in a way that
consecutive %% didn't catch regressions.

This commit introduces an extra test for __exact lookups which
highlights more adequately % doubling problems but also adjust a
previous __endswith test to cover % doubling problems (%\% -> %%\%%).

Thanks Thomas Kolar for the report.

Refs #32369, #30408, #30593.
2023-05-10 17:25:57 +02:00
Simon Charette
e0f8104a96 Refs #34553 -- Split constraint escaping test in subtests.
This ensures that constraint violations are tested in isolation from
each other as an IntegrityError only ensures a least one constraint is
violated.

For example, the assertion added in 42e8cf4 break both the
name_constraint_rhs and the rebate_constraint constraints and thus
doesn't constitute a proper regression test. Refs #32369.
2023-05-10 17:25:57 +02:00
Mariusz Felisiak
6e32d1fa1d
Fixed #34554 -- Fixed Reverse(Value(…)) crash on Oracle. 2023-05-10 17:22:45 +02:00
Lily Foote
c494c6974d Removed obsolete docstring from Field.db_returning.
It's also supported on SQLite 3.35+ and MariaDB 10.5+.
2023-05-10 08:26:25 +02:00
Akash Kumar Sen
92f0017133 Refs #34534 -- Reduced Add/RemoveConstraint and Add/RenameIndex operations when optimizing migrations. 2023-05-09 12:45:09 +02:00
Mariusz Felisiak
59262c294d
Moved SQLite DatabaseSchemaEditor.add_field()'s comment to the correct line. 2023-05-09 11:39:49 +02:00
Mariusz Felisiak
1586a09b79
Fixed #34544 -- Avoided DBMS_LOB.SUBSTR() wrapping with IS NULL condition on Oracle.
Regression in 09ffc5c121.

Thanks Michael Smith for the report.

This also reverts commit 1e4da43955.
2023-05-08 19:34:30 +02:00
Akash Kumar Sen
aaf8c76c56
Fixed #34545 -- Corrected the number of months in installation FAQ. 2023-05-08 08:34:23 +02:00
Pan Dango
12ec80726f
Corrected code-block directive in docs/ref/templates/builtins.txt. 2023-05-07 14:51:27 +02:00
Mariusz Felisiak
ca5d3c99ef
Refs #27236 -- Made more cosmetic edits to Meta.index_together deprecation. 2023-05-05 09:26:51 +02:00
Jannis Vajen
024954aad4 Corrected code-block directives in docs. 2023-05-04 14:10:11 +02:00
Sarah Boyce
60ac77f32e
Removed unnecessary workarounds for Sphinx < 4.3.0.
Unnecessary since ebf25555bb.
2023-05-04 13:55:06 +02:00
Mariusz Felisiak
fcfbf08abe
Fixed MultipleFileFieldTest.test_file_multiple_validation() test if Pillow isn't installed.
Follow up to fb4c55d9ec.
2023-05-04 08:09:02 +02:00
Jan Pieter Waagmeester
f5b39b77e3 Fixed #34535 -- Fixed SQLite dbshell crash on pathlib.Path when handling CommandError.
Regression in 5b884d45ac.
2023-05-04 06:07:12 +02:00
Mariusz Felisiak
49830025c9 Added CVE-2023-31047 to security archive. 2023-05-03 15:20:31 +02:00
Mariusz Felisiak
b0d3a5de95 Added stub release notes for 4.2.2. 2023-05-03 15:13:07 +02:00
Mariusz Felisiak
fb4c55d9ec Fixed CVE-2023-31047, Fixed #31710 -- Prevented potential bypass of validation when uploading multiple files using one form field.
Thanks Moataz Al-Sharida and nawaik for reports.

Co-authored-by: Shai Berger <shai@platonix.com>
Co-authored-by: nessita <124304+nessita@users.noreply.github.com>
2023-05-03 13:42:00 +02:00
Mariusz Felisiak
8e2460d599
Fixed #34529, Refs #34525 -- Reduced index operations with Meta.indexes/index_together when optimizing migrations.
This makes squashing migrations an available path for changing
Meta.index_together, which is deprecated, to Meta.indexes.

Follow up to f810325721.
2023-05-03 13:06:19 +02:00
Mariusz Felisiak
83339d2103
Fixed #34523 -- Fixed TransactionManagementError in QuerySet.update_or_create() with MyISAM storage engine.
QuerySet.update_or_create() uses nested atomic to handle possible
integrity errors taking savepoints as way to mark back the connection
as usable. Savepoints are not returned when
uses_savepoints/can_release_savepoints feature flags are set to False.
As a consequence, QuerySet.update_or_create() assumed the outer atomic
block is tainted and raised TransactionManagementError.

This commit partly reverts 331a460f8f.

Thanks gatello-s for the report.
2023-05-03 07:58:42 +02:00
Orhan Hirsch
ea53e7c09f Fixed #34517 -- Avoided connection post_init signal to ImageField without width/height fields. 2023-05-03 06:35:19 +02:00
Paul Brown
3b62d8c83e
Refs #31369 -- Improved hint message in NullBooleanField's deprecation warning. 2023-05-02 15:42:11 -03:00
Ran Benita
506f93f0c3
Fixed #34530 -- Improved docs when customizing storage for FileField. 2023-05-02 15:32:24 -03:00
Bakdolot
c61219a7ae
Fixed #34513 -- Added system check for relational fields in ModelAdmin.list_display. 2023-05-02 06:46:22 +02:00
Mariusz Felisiak
0e444e84f8 Fixed #34515 -- Made LocaleMiddleware prefer language from paths when i18n patterns are used.
Regression in 94e7f471c4.

This reverts commit 94e7f471c4
(refs #34069) and
partly reverts commit 3b4728310a.

Thanks Anthony Baillard for the report.

Co-Authored-By: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
2023-05-02 06:04:18 +02:00
Mariusz Felisiak
191f6a9a45
Fixed #34528 -- Reduced Add/RemoveIndex operations when optimizing migrations. 2023-05-01 18:57:24 +02:00
4the4ryushin
0b0998dc15 Fixed #33759 -- Avoided unnecessary subquery in QuerySet.delete() with self-referential subqueries if supported. 2023-05-01 10:20:20 +02:00
Mariusz Felisiak
5a6d4d3bfd
Refs #34118, Refs #34504 -- Added backward incompatibility note about EmailBackend.ssl_context.
Follow up to 2848e5d0ce.
2023-04-28 13:04:08 +02:00
Coen van der Kamp
7bbbadc693 Fixed #34380 -- Allowed specifying a default URL scheme in forms.URLField.
This also deprecates "http" as the default scheme.
2023-04-28 06:58:10 +02:00
Marc Gibbons
070cbac0db
Restored multiprocessing concurrency on coverage.py settings
* Revert "Reverted "Fixed #33213 -- Doc'd testing code coverage in parallel and used it.""

This reverts commit 78da5ca0c1.

* Restored coverage multiprocess concurrency with threads

Investigating https://github.com/nedbat/coveragepy/issues/1585 revealed
that thread tracing gets disabled when passing
`concurrency = multiprocessing`. Adding `thread` restores it, and
ensures that the `auser()` is reported as covered since the test suite
uses `AsyncToSync` to execute this middleware (which spawns threads).
2023-04-27 17:02:55 -03:00
Andrei Shabanski
5c456a8793
Refs #33662 -- Corrected Sitemap.get_languages_for_item() signature in docs. 2023-04-27 19:53:26 +02:00
Mariusz Felisiak
720abed343
Avoided creating default form fields in fields_for_model() when declared on form. 2023-04-27 15:26:23 +02:00
Tom Forbes
23d24f82a7
Doc'd that Count("*") is equivalent to COUNT(*) SQL. 2023-04-27 11:52:54 +02:00
David Sanders
7d0e566208
Fixed #34518 -- Fixed crash of random() template filter with an empty list. 2023-04-26 14:17:57 +02:00
Mariusz Felisiak
18a7f2c711 Added stub release notes and release date for 4.2.1, 4.1.9, and 3.2.19. 2023-04-26 08:47:44 +02:00
Mariusz Felisiak
9440f6ba41
Fixed #34512 -- Restored breadcrumbs on admin app index view.
Thanks Adam (ataylor32) for the report.

Regression in 872b61193b.
2023-04-26 08:36:56 +02:00
Claude Paroz
453cfa2815 Replaced docutils link by PyPI reference. 2023-04-25 12:41:06 +02:00