Commit Graph

31687 Commits

Author SHA1 Message Date
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
Ben Lomax 4dfc6ff8a8 Refs #31949 -- Made @never_cache and @cache_control() decorators to work with async functions.
Thanks Carlton Gibson and Mariusz Felisiak for reviews.
2023-04-25 10:08:03 +02:00
Ben Lomax a14ddc8cfc Added more tests for @cache_control decorator. 2023-04-25 10:04:49 +02:00
Andreas Dickow c24cd6575f Updated admin's XRegExp to 5.1.1. 2023-04-25 09:30:52 +02:00
Bakdolot c813fb327c
Fixed #34481 -- Added system check for reverse related fields in ModelAdmin.list_display. 2023-04-24 08:14:35 -03:00
Simon Charette 83c9765f45 Refs #33766 -- Removed sql.Query.build_filtered_relation_q().
It was a copy of sql.Query._add_q that avoided JOIN updates.
2023-04-24 08:32:49 +02:00
Simon Charette 1a13161eab Refs #33766 -- Removed unused Join.equals().
It's unused now that the specialized FilteredRelation.as_sql logic is
no more.
2023-04-24 08:32:49 +02:00
Simon Charette d660cee5bc Fixed #33766 -- Resolved FilteredRelation.condition at referencing time.
The previous implementation resolved condition at Join compilation time
which required introducing a specialized expression resolving mode to
alter the join reuse logic solely during that phase.

FilteredRelation.condition is now resolved when the relation is first
referenced which maintains the existing behavior while allowing the
removal of the specialized resolving mode and address an issue where
conditions couldn't spawn new joins.
2023-04-24 08:32:44 +02:00
Claude Paroz 3fe0c609cf
Updated Django Transifex links.
Subdomain was changed on April 3rd and redirects will stop on July 2023.
2023-04-22 16:18:21 +02:00
nessita 851b687956
Refs #34462 -- Fixed queryset antipattern when processing object deletion. 2023-04-22 12:23:22 +02:00
Mariusz Felisiak 92537e83c1
Fixed #34506 -- Fixed margin of ClearableFileInput in admin CSS.
Regression in 96a598356a.
2023-04-21 19:49:59 +02:00
Mariusz Felisiak c487634c10
Added meaningful titles to ..admonition:: directives. 2023-04-21 12:03:59 +02:00
Petter Friberg 8ed25d65ea Fixed #34505 -- Skipped varchar_pattern_ops/text_pattern_ops index creation when db_collation is set in related field. 2023-04-21 10:31:22 +02:00
Mariusz Felisiak 765b96734c Added SchemaTests._add_ci_collation() hook. 2023-04-21 10:00:09 +02:00
Marcelo Galigniana 8a6c0203c4 Fixed #34488 -- Made ClearableFileInput preserve "Clear" checked attribute when form is invalid. 2023-04-21 07:48:27 +02:00
Hielke Walinga fb535e0a90 Fixed #34496 -- Fixed handling source maps with data URI in ManifestStaticFilesStorage.
Regression in 781b44240a.
2023-04-21 05:42:06 +02:00
Mariusz Felisiak 498195bda4
Improved examples in docs about raw SQL queries.
Regression in 14459f80ee.
2023-04-20 12:24:33 +02:00
David Sanders 0494efddc4 Fixed #34440 -- Doc'd that & queryset operator works similar to chaining. 2023-04-20 08:37:29 +02:00
David Sanders 2a57785363
Corrected exception type in safe_join()'s docstring. 2023-04-20 05:44:01 +02:00
Sage Abdullah 01ae9d4ca9 Fixed #34435 -- Doc'd that JSONField.default must be a callable. 2023-04-19 20:51:42 +02:00
Michael J Walsh 5b5f5e4cc6
Added Irish locale formats.
Thanks Tom Moran for the report.
2023-04-19 19:32:32 +02:00
Sarah Boyce 1611a3af1c
Doc'd RemovedInDjangoXXWarning comments in deprecating a feature guide. 2023-04-19 08:47:27 -03:00
David Wobrock 8b1ff0da4b Refs #16055 -- Deprecated get_joining_columns()/get_reverse_joining_columns() methods. 2023-04-18 12:46:27 +02:00
David Wobrock 9bbf97bcdb Fixed #16055 -- Fixed crash when filtering against char/text GenericRelation relation on PostgreSQL. 2023-04-18 12:41:14 +02:00
sarahboyce 594fcc2b74 Fixed #22569 -- Made ModelAdmin.lookup_allowed() respect get_list_filter().
Thank you Simon Meers for the initial patch.
2023-04-17 14:09:38 +02:00
Tim Graham 57f2b935b3 Added Snowflake to list of third-party DB backends. 2023-04-17 06:55:39 +02:00
Tim Graham 2c4dc64760 Used extlinks for PyPI links.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2023-04-17 06:55:32 +02:00
Edison Wang 255f534590
Fixed #34419 -- Doc'd django.contrib.admin.sites.all_sites. 2023-04-15 08:28:55 +02:00