1
0
mirror of https://github.com/django/django.git synced 2025-01-15 04:45:51 +00:00

4706 Commits

Author SHA1 Message Date
Mariusz Felisiak
da2475a217 [5.0.x] Added stub release notes for 4.2.9.
Backport of 464af0975cac6abc46b3e5c3305194c958fc465b from main
2023-12-05 06:11:44 +01:00
Mariusz Felisiak
a1ddda7ac2 [5.0.x] Updated expected release date for 5.0.1.
Backport of 689306c745f996cf358196f77748a4e91502987c from main
2023-12-05 06:03:44 +01:00
Natalia
cd4beb995c [5.0.x] Added stub release notes for 5.0.1.
Backport of 14884b6be89963c8ceb2c9da459ed8421aea3bf8 from main
2023-12-04 10:23:51 -03:00
Natalia
94914b550d [5.0.x] Finalized release notes for Django 5.0.
Backport of 1994a2643881a9e3f9fa8d3e0794c1a9933a1831 from main
2023-12-04 09:55:28 -03:00
Mariusz Felisiak
e4d7cc3eae [5.0.x] Added release date for 4.2.8.
Backport of 8fcb9f1f106cf60d953d88aeaa412cc625c60029 from main
2023-12-04 09:25:37 +01:00
Mariusz Felisiak
7f1dc67f53 [5.0.x] Fixed #35006 -- Fixed migrations crash when altering Meta.db_table_comment on SQLite.
Thanks Юрий for the report.

Regression in 78f163a4fb3937aca2e71786fbdd51a0ef39629e.
Backport of 37fc832a54ad37e75a898a2c8f9ab0820617c4af from main
2023-11-30 10:11:02 +01:00
Mariusz Felisiak
92af3d4d23 [5.0.x] Refs #34380 -- Added FORMS_URLFIELD_ASSUME_HTTPS transitional setting.
This allows early adoption of the new default "https".

Backport of a4931cd75a1780923b02e43475ba5447df3adb31 from main.
2023-11-28 20:08:10 +01:00
Tom Carrick
432bfa2615 [5.0.x] Fixed #34982 -- Fixed admin's read-only password widget and help texts alignment for tablet screen size.
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>

Backport of 729266c6f29c7a0677b24926a86a767ef3078b26 from main
2023-11-27 15:20:22 -03:00
Mariusz Felisiak
cbd1e913ef [5.0.x] Fixed #34978, Refs #31331 -- Added backward incompatibility note about raw aggregations on MySQL.
Thanks Matthew Somerville for the report.

Backport of a652f0759651dd7103ed04336ef85dc410f680c1 from main
2023-11-27 12:45:23 -03:00
Nathaniel Conroy
d9ba8fa397 [5.0.x] Fixed #34992 -- Fixed DatabaseFeatures.allows_group_by_selected_pks on MariaDB with ONLY_FULL_GROUP_BY sql mode.
Regression in 041551d716b69ee7c81199eee86a2d10a72e15ab.

Backport of 0257426fe1fe9d146fd5813f09d909917ff59360 from main
2023-11-27 10:34:42 +01:00
Adam Johnson
4c74dff759 [5.0.x] Refs #34380 -- Improved docs for forms.URLField.assume_scheme.
Backport of 0203771b626c27c1af24cdeb0e425ccca3d19ad5 from main
2023-11-25 18:53:34 +01:00
Tom Carrick
4d33816ca6 [5.0.x] Fixed #34994 -- Fixed checkbox layout in admin's change page for narrow screen widths.
Regression in d687febce5868545f99974d2499a91f81a32fef5.

Backport of a89c715c3bcf7ab1a90747cf8658ebce6304b6e4 from main
2023-11-23 16:56:29 -03:00
Tom Carrick
15d49c8082 [5.0.x] Fixed #34991 -- Fixed pagination links and input layout in admin's change list page when using list_editable.
Regression in b4817d20b9e55df30be0b1b2ca8c8bb6d61aab07.

Thanks Tom Carrick for the report and fix.

Backport of 4eb9c3d90aff55182151b6be0122f7d0b28832fd from main
2023-11-23 10:23:31 -03:00
Simon Charette
95dec210e8 [5.0.x] Fixed #34987 -- Fixed queryset crash when mixing aggregate and window annotations.
Regression in f387d024fc75569d2a4a338bfda76cc2f328f627.

Just like `OrderByList` the `ExpressionList` expression used to wrap
`Window.partition_by` must implement `get_group_by_cols` to ensure the
necessary grouping when mixing window expressions with aggregate
annotations is performed against the partition members and not the
partition expression itself.

This is necessary because while `partition_by` is implemented as
a source expression of `Window` it's actually a fragment of the WINDOW
expression at the SQL level and thus it should result in a group by its
members and not the sum of them.

Thanks ElRoberto538 for the report.
Backport of e76cc93b0168fa3abbafb9af1ab4535814b751f0 from main
2023-11-23 06:09:58 +01:00
Mariusz Felisiak
f721fb937c [5.0.x] Refs #34118 -- Doc'd Python 3.12 compatibility in Django 4.2.x.
Backport of ecfea054ee2b8ddfa027459ff8b6aecba05facf7 from main
2023-11-19 16:33:01 +01:00
Simon Charette
49f1ced863 [5.0.x] Fixed #34975 -- Fixed crash of conditional aggregate() over aggregations.
Adjustments made to solve_lookup_type to defer the resolving of
references for summarized aggregates failed to account for similar
requirements for lookup values which can also reference annotations
through Aggregate.filter.

Regression in b181cae2e3697b2e53b5b67ac67e59f3b05a6f0d.

Refs #25307.

Thanks Sergey Nesterenko for the report.

Backport of 7530cf3900ab98104edcde69e8a2a415e82b345a from main
2023-11-18 16:52:54 +01:00
David Smith
7f0275d8cb [5.0.x] Refs #32819 -- Used auto_id instead of id_for_label as unique identifier for the field.
`id_for_label` is blank for widgets with multiple inputs such as radios
and multiple checkboxes. Therefore , `help_text` for fields using these
widgets cannot currently be associated using `aria-describedby`.
`id_for_label` is being used as a guard to avoid incorrectly adding
`aria-describedby` to those widgets.

This change uses `auto_id` as the unique identified for the fields
`help_text`. A guard is added to avoid incorrectly adding
`aria-describedby` to inputs by checking the widget's `use_fieldset`
attribute. Fields rendered in a `<fieldset>` should have
`aria-describedby` added to the `<fieldset>` and not every `<input>`.

Backport of 292f1ea90f90ff140617299a25884c8fda24aa64 from main
2023-11-16 13:27:18 +01:00
Mariusz Felisiak
ddbe5c86e8 [5.0.x] Fixed #34944 -- Made GeneratedField.output_field required.
Regression in f333e3513e8bdf5ffeb6eeb63021c230082e6f95.

Backport of 5875f03ce61b85dfd9ad34f7b871c231c358d432 from main
2023-11-14 20:22:33 +01:00
Adam Johnson
8eba6efbf0 [5.0.x] Fixed #34457 -- Restored output for makemigrations --check.
Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com>
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>

Backport of f7389c4b07ceeb036436e065898e411b247bca78 from main
2023-11-09 10:44:07 -03:00
Mariusz Felisiak
fd593db2fa [5.0.x] Added stub release notes for 4.2.8.
Backport of 36173cf29d6ad0b0f0cd24326834dddfff2db7f3 from main
2023-11-01 08:25:18 +01:00
Mariusz Felisiak
2d929dd2cc [5.0.x] Added CVE-2023-46695 to security archive.
Backport of 7caf2621833a45cdfe7e6e305e4885ecc8d79744 from main
2023-11-01 08:17:30 +01:00
Mariusz Felisiak
bb71d34551 [5.0.x] Fixed CVE-2023-46695 -- Fixed potential DoS in UsernameField on Windows.
Thanks MProgrammer (https://hackerone.com/mprogrammer) for the report.
2023-11-01 06:18:00 +01:00
Tom Carrick
602835202d [5.0.x] Fixed #34932 -- Restored varchar_pattern_ops/text_pattern_ops index creation when deterministic collaction is set.
Regression in f3f9d03edf17ccfa17263c7efa0b1350d1ac9278 (4.2) and
8ed25d65ea7546fafd808086fa07e7e5bb5428fc (5.0).

Backport of 34b411762b50883d768d7b67e0a158ec39da8b09 from main
2023-10-30 11:08:03 +01:00
Mariusz Felisiak
3361668ff4 [5.0.x] Added stub release notes and release date for 4.2.7, 4.1.13, and 3.2.23.
Backport of fdd1323b9c83e56184e0c992af8faf8d54327775 from main
2023-10-25 05:43:00 +02:00
Claire Pritchard
4979e83d08 [5.0.x] Fixed typo in docs/releases/4.2.txt.
Backport of 61cc0e6f2c5115415e70e0a7eddd59b7c2aed40d from main
2023-10-22 11:02:40 +02:00
Simon Charette
4ccca9eedc [5.0.x] Fixed #34798 -- Fixed QuerySet.aggregate() crash when referencing expressions containing subqueries.
Regression in 59bea9efd2768102fc9d3aedda469502c218e9b7,
complements e5c844d6f2a4ac6ae674d741b5f1fa2a688cedf4.

Refs #28477, #34551.

Thanks Haldun Komsuoglu for the report.

Backport of 3b4a571275d967512866012955eb0b3ae486d63c from main
2023-10-16 06:15:08 +02:00
Adam Johnson
12a19321b4 [5.0.x] Refs #34840 -- Improved release note describing index regression.
Backport of 73b2c63127297e214d3bfdc8d9a96837691fc2a0 from main
2023-10-15 10:27:41 +02:00
Mariusz Felisiak
5aa4fb68ba [5.0.x] Added backticks to setuptools in docs.
Backport of 54b23b1835a8044c35754525dfcf2c3027d79aa8 from main
2023-10-09 09:56:26 +02:00
Natalia
bc2d12637e [5.0.x] Added stub release notes for 4.2.7.
Backport of 034457941abf33b194cb145443575bf7fb454faf from main
2023-10-04 13:23:31 -03:00
Natalia
3db945a6b3 [5.0.x] Added CVE-2023-43665 to security archive.
Backport of 4e790271e3e65c9ad037b347a34fa95e11982228 from main
2023-10-04 13:13:06 -03:00
Natalia
8124c42601 [5.0.x] Fixed CVE-2023-43665 -- Mitigated potential DoS in django.utils.text.Truncator when truncating HTML text.
Thanks Wenchao Li of Alibaba Group for the report.
2023-10-04 09:38:26 -03:00
Natalia
0ca421c5aa [5.0.x] Added stub release notes and release date for 4.2.6, 4.1.12, and 3.2.22.
Backport of 5e4b75b78a7a84bc30170c2b8e7434525e745c1b from main
2023-09-27 14:26:21 -03:00
Mariusz Felisiak
2566f92544 [5.0.x] Fixed #34840 -- Avoided casting string base fields on PostgreSQL.
Thanks Alex Vandiver for the report.

Regression in 09ffc5c1212d4ced58b708cbbf3dfbfb77b782ca.

Backport of 779cd28acb1f7eb06f629c0ea4ded99b5ebb670a from main.
2023-09-22 06:03:19 +02:00
Paolo Melchiorre
7e4c1e8b3d [5.0.x] Refs #31300 -- Added example to GeneratedField release notes.
Backport of 0b506bfe1ab9f1c38e439c77b3c3f81c8ac663ea from main
2023-09-20 09:01:41 +02:00
Mariusz Felisiak
1eeb84aa04 [5.0.x] Fixed typo in docs/releases/5.0.txt.
Backport of 909f8e4c24e5c0c2fcf3f6bab2f87c0735bcc832 from main
2023-09-19 09:27:58 +02:00
Natalia
613b7ba212 Made cosmetic edits to docs/releases/5.0.txt. 2023-09-18 10:21:25 -03:00
Natalia
a7aaba0f85 Removed empty sections from 5.0 release notes. 2023-09-18 09:51:35 -03:00
Clément Escolano
cac94dd8aa Fixed #33651 -- Added support for prefetching GenericForeignKey.
Co-authored-by: revanthgss <revanthgss@almabase.com>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2023-09-18 13:23:21 +02:00
Mariusz Felisiak
190874eadd
Fixed #34560 -- Updated admin's jQuery to 3.7.1. 2023-09-18 08:54:44 +02:00
Ryanwalker277
225328efd9 Fixed #31558 -- Added support for boolean attribute on properties in ModelAdmin.list_display. 2023-09-16 20:54:26 +02:00
Sarah Abderemane
814e7bc220 Fixed #34832 -- Made admin's header content render in <header> tag.
Header tag was changed to <header> get the landmark banner for
accessibility.
2023-09-15 05:36:43 +02:00
Natalia
691f70c477 Fixed #24561 -- Added support for callables on model fields' choices. 2023-09-14 10:15:33 -03:00
Sarah Abderemane
91e617c743 Fixed #34833 -- Made admin's main content render in <main> tag. 2023-09-14 05:41:31 +02:00
Nick Pope
f92e68c30a Fixed #34822 -- Added support for serializing functions decorated with functools.lru_cache in migrations.
`@functools.cache` and `@functools.lru_cache` return an object of type
`functools._lru_cache_wrapper` which prevented the migrations serializer from
working. Simply using the existing `FunctionTypeSerializer` for this additional
type works as expected.
2023-09-13 15:57:18 -03:00
Ben Lomax
74f7deec9e Refs #31949 -- Made make_middleware_decorator to work with async functions. 2023-09-13 11:41:01 +02:00
Nick Pope
e15174983a Renamed ChoicesMeta to ChoicesType.
This also uses enum.EnumType for Python 3.11+ as Python 3.11 renamed
EnumMeta to EnumType. While the former is still available as an alias
of the latter for now, let's prefer the canonical name for this.

Check out https://docs.python.org/3/library/enum.html#enum.EnumType
2023-09-12 11:51:01 +02:00
Mariusz Felisiak
a7c73b944f
Fixed #34821 -- Prevented DEFAULT_FILE_STORAGE/STATICFILES_STORAGE settings from mutating the main STORAGES.
Regression in 6b965c600054f970bdf94017ecf2e0e6e0a4326b.
2023-09-11 13:04:32 +02:00
Yves Weissig
369b498219 Fixed #34642 -- Added File.open() support for *args and **kwargs. 2023-09-11 06:07:47 +02:00
Jeremy Nauta
f333e3513e Fixed #31300 -- Added GeneratedField model field.
Thanks Adam Johnson and Paolo Melchiorre for reviews.

Co-Authored-By: Lily Foote <code@lilyf.org>
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2023-09-07 06:19:08 +02:00
François Freitag
cafe7266ee Fixed #34730 -- Added django.contrib.messages.test.MessagesTestMixin.assertMessages(). 2023-09-05 11:55:37 +02:00