summaryrefslogtreecommitdiff
path: root/django
AgeCommit message (Collapse)Author
2023-10-23[5.0.x] Bumped version for 5.0 beta 1.5.0b1Natalia
2023-10-23[5.0.x] Fixed #34899 -- Added blank choice to forms' callable choices lazily.Nick Pope
Backport of 171f91d9ef5177850c2f12b26dd732785f6ac034 from main
2023-10-23[5.0.x] Refs #34899 -- Extracted Field.flatchoices to flatten_choices helper ↵Nick Pope
function. Co-authored-by: Natalia Bidart <124304+nessita@users.noreply.github.com> Backport of 74afcee234f8be989623ccc7c28b9fb97fb548f0 from main
2023-10-23[5.0.x] Refs #31262 -- Added __eq__() and __getitem__() to BaseChoiceIterator.Nick Pope
This makes it easier to work with lazy iterators used for callables, etc. when extracting items or comparing to lists, e.g. during testing. Also added `BaseChoiceIterator.__iter__()` to make it clear that subclasses must implement this and added `__all__` to the module. Co-authored-by: Adam Johnson <me@adamj.eu> Co-authored-by: Natalia Bidart <124304+nessita@users.noreply.github.com> Backport of 07fa79ef2bb3e8cace7bd87b292c6c85230eed05 from main
2023-10-23[5.0.x] Fixed #34903, Refs #34825 -- Made workers initialization respect ↵David Sanders
empty set of used connections. Thanks to David Smith for the investigation & patch. Regression in 2128a73713735fb794ca6565fd5d7792293f5cfa. Follow up to a5905b164dbf52e59fa646af9c3d523c0804d86a. Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com> Backport of 68d0159b6dfce07f144045d56639c52066e8b90e from main
2023-10-22[5.0.x] Fixed #34921 -- Fixed crash of warning for unbound naive datetimes.David Sanders
Backport of b5311ee23219cfb676e2e67667ecba1e5d363aa0 from main
2023-10-21[5.0.x] Fixed #34912 -- Fixed size of back links and bookmarklet help in ↵Chris Frisina
admindocs pages. Backport of be8b25def45bda2e9d1b63e67a80362832bcf45d from main
2023-10-20[5.0.x] Fixed #34911 -- Corrected HTML heading levels on admindocs' main page.laserhyena
Backport of 21382e2743d06efbf5623e7c9b6dccf2a325669b from main
2023-10-19[5.0.x] Fixed #34905 -- Corrected admin's main content element rendered in ↵ontowhee
<main> tag. Regression in 91e617c743b21a0ebad01f18623a8b31f6f58500. Thanks Tom Carrick for the report. Backport of 89d2ae257bfdbe6f32c4671d97bf572623992ace from main
2023-10-16[5.0.x] Fixed #34798 -- Fixed QuerySet.aggregate() crash when referencing ↵Simon Charette
expressions containing subqueries. Regression in 59bea9efd2768102fc9d3aedda469502c218e9b7, complements e5c844d6f2a4ac6ae674d741b5f1fa2a688cedf4. Refs #28477, #34551. Thanks Haldun Komsuoglu for the report. Backport of 3b4a571275d967512866012955eb0b3ae486d63c from main
2023-10-11[5.0.x] Fixed #12241 -- Preserved query strings when using "Save and ↵Mariana
continue/add another" in admin. Co-authored-by: Grady Yu <gradyy@users.noreply.github.com> Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com> Co-authored-by: Matthew Newton <matthewn@berkeley.edu> Backport of fc62e17778dad9eab9e507d90d85a33d415f64a7 from main
2023-10-10[5.0.x] Refs #26029 -- Improved get_storage_class() deprecation warning with ↵Carlton Gibson
stacklevel=2. Addition of the `stacklevel` argument shows the source of the deprecated call, making updating the client code simpler.
2023-10-06[5.0.x] Fixed #34889 -- Fixed get_prefetch_queryset() fallback in ↵Mariusz Felisiak
prefetch_one_level(). Thanks Matt Westcott for the report. Regression in cac94dd8aa2fb49cd2e06b5b37cf039257284bb0. Backport of 296b75a3c0309a936a6c07d8f711f722e3b96e63 from main
2023-10-06[5.0.x] Fixed #34882 -- Fixed no options in AsGeoJSON() for geometries in ↵Denis Rouzaud
non-default CRS. Backport of 96e7a752b6c44a84e18d82d37524c1df64b32e12 from main
2023-10-04[5.0.x] Refs #33482 -- Fixed QuerySet selecting and filtering againts ↵Simon Charette
Exists() with empty queryset. Thanks Tobias Bengfort for the report. Backport of ea596a52d9f905596cc5335930c8f2ac4511204c from main
2023-10-04[5.0.x] Fixed CVE-2023-43665 -- Mitigated potential DoS in ↵Natalia
django.utils.text.Truncator when truncating HTML text. Thanks Wenchao Li of Alibaba Group for the report.
2023-10-02[5.0.x] Fixed #32602 -- Clarified wording of TestCase class.faishalmanzar
Backport of f4e72e6523e6968d9628dfbff914ab57dbf19e6b from main
2023-09-29[5.0.x] Fixed #34878 -- Fixed autoreloader crash when FORM_RENDERER is set ↵Dan Jacob
to TemplatesSetting. Regression in 439242c5943e16dd5a3a68fadac76e5e723eb323. Backport of fe835c2355072fc2b7a0fbbc57d05477c7ee6ce9 from main
2023-09-28[5.0.x] Fixed #34877 -- Fixed migrations crash when adding GeneratedField ↵Paolo Melchiorre
with output_field with params. Backport of e7e8eb44a30bcab004a582760752b5eb3fcd6e91 from main
2023-09-25[5.0.x] Fixed #34825 -- Avoided setting unused connections when initializing ↵David Sanders
parallel workers. Backport of a5905b164dbf52e59fa646af9c3d523c0804d86a from main
2023-09-25[5.0.x] Fixed #34849 -- Avoided raising RuntimeWarning about import-time ↵David Sanders
queries when apps are reinitialized with test tools. Regression in fbd16438f46bc2128926958ad24331da5d1b406f. Backport of 4f2ae0644de34791b84b7beb11a966ce4bc48fb6 from main
2023-09-22[5.0.x] Fixed #34861 -- Fixed crash when adding GeneratedField with some ↵Paolo Melchiorre
expressions. Co-authored-by: Simon Charette <charette.s@gmail.com> Backport of 574ee4023e15cfb195833edfbaed353f8021c62f from main
2023-09-22[5.0.x] Fixed #34823 -- Fixed assertTemplateUsed() context manager crash on ↵Arian
unnamed templates. Backport of 51d703a27fee518491adee1e07e2b857a90b2c8d from main
2023-09-22[5.0.x] Fixed #34858 -- Corrected resolving output_field for ↵toan
PositiveIntegerField. Regression in 40b8a6174f001a310aa33f7880db0efeeb04d4c4. Backport of 4de31ec680df062e5964b630f1b881ead5004e15 from main
2023-09-22[5.0.x] Fixed #34848 -- Ignored i18n_catalog.js file when building Django's ↵Natalia
translations catalog. Backport of d7972436639bacada0f94d3b9818446343af59ad from main
2023-09-22[5.0.x] Fixed #34840 -- Avoided casting string base fields on PostgreSQL.Mariusz Felisiak
Thanks Alex Vandiver for the report. Regression in 09ffc5c1212d4ced58b708cbbf3dfbfb77b782ca. Backport of 779cd28acb1f7eb06f629c0ea4ded99b5ebb670a from main.
2023-09-21[5.0.x] Fixed #34857 -- Made calendar "Cancel" button in admin use color ↵Fabian Braun
variables. Backport of 34ca1d3ab45f8f3f3d5bb867e4d13ca663deaa89 from main
2023-09-18[5.0.x] Bumped version for 5.0 alpha 1 release.5.0a1Natalia
2023-09-18[5.0.x] Updated source translation catalogs.Natalia
This work includes the updating of the translations catalog for JS files. The catalog was generated with this command: django-admin makemessages -l en --domain=djangojs -i views/templates/i18n_catalog.js The `views/templates/i18n_catalog.js` file had to be ignored because otherwise the command would fail as follows: xgettext: warning: msgid '' is used without plural and with plural. ./views/templates/i18n_catalog.js:52: Here is the occurrence without plural. ./views/templates/i18n_catalog.js:60: Here is the occurrence with plural. Workaround: If the msgid is a sentence, change the wording of the sentence; otherwise, use contexts for disambiguation. CommandError: errors happened while running msguniq /home/nessita/fellowship/django/django/conf/locale/djangojs.pot:22: context separator <EOT> within string /home/nessita/fellowship/django/django/conf/locale/djangojs.pot:23: context separator <EOT> within string msguniq: found 2 fatal errors
2023-09-18Fixed #33651 -- Added support for prefetching GenericForeignKey.Clément Escolano
Co-authored-by: revanthgss <revanthgss@almabase.com> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2023-09-18Fixed #34560 -- Updated admin's jQuery to 3.7.1.Mariusz Felisiak
2023-09-16Fixed #31558 -- Added support for boolean attribute on properties in ↵Ryanwalker277
ModelAdmin.list_display.
2023-09-16Fixed #34842 -- Fixed ModelAdmin.readonly_fields crash with GeneratedFields.Paolo Melchiorre
2023-09-15Fixed #34832 -- Made admin's header content render in <header> tag.Sarah Abderemane
Header tag was changed to <header> get the landmark banner for accessibility.
2023-09-14Fixed #34838 -- Corrected output_field of resolved columns for GeneratedFields.Paolo Melchiorre
Thanks Simon Charette for the implementation idea.
2023-09-14Fixed #34834 -- Added role="search" to the admin changelist search form.Lemuel Sta Ana
2023-09-14Fixed #24561 -- Added support for callables on model fields' choices.Natalia
2023-09-14Fixed #34833 -- Made admin's main content render in <main> tag.Sarah Abderemane
2023-09-13Fixed #34822 -- Added support for serializing functions decorated with ↵Nick Pope
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-13Refs #31949 -- Made make_middleware_decorator to work with async functions.Ben Lomax
2023-09-13Modernized enumeration helpers on Python 3.11+.Nick Pope
- use @enum.property https://docs.python.org/3/library/enum.html#enum.property - use @enum.nonmember Using @property on an enum class does not yield the expected result. do_not_call_in_templates attribute works because a @property instance is truthy. We can make this a literal True value as expected by using @enum.nonmember in Python 3.11+. https://docs.python.org/3/library/enum.html#enum.nonmember - used enum.IntEnum/StrEnum Python 3.11+ has ReprEnum which uses int.__str__() and str.__str__() for __str__() in the `IntEnum` and `StrEnum` subclasses. We can emulate that for Python < 3.11. https://docs.python.org/3/library/enum.html#enum.ReprEnum https://docs.python.org/3/library/enum.html#enum.IntEnum https://docs.python.org/3/library/enum.html#enum.StrEnum
2023-09-13Refs #34233 -- Used @staticmethod with TextChoices._generate_next_value_().Nick Pope
Now that Python 3.10 is the minimum supported version, we can decorate _generate_next_value_() with @staticmethod. It wasn't possible before as Python < 3.10 does not support calling static methods direct from the class body. https://docs.python.org/3/library/enum.html#enum.Enum._generate_next_value_
2023-09-12Renamed ChoicesMeta to ChoicesType.Nick Pope
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-12Removed ChoicesMeta.__contains__() for Python 3.12+.Nick Pope
In Python 3.12 it is possible to check containment using member values, not just the members themselves. https://docs.python.org/3/library/enum.html#enum.EnumType.__contains__
2023-09-11Fixed #34752 -- Fixed handling ASGI http.disconnect for streaming responses.Sam Toyer
2023-09-11Fixed #34821 -- Prevented DEFAULT_FILE_STORAGE/STATICFILES_STORAGE settings ↵Mariusz Felisiak
from mutating the main STORAGES. Regression in 6b965c600054f970bdf94017ecf2e0e6e0a4326b.
2023-09-11Fixed #34824 -- Prevented unnecessary AlterField when ↵donghao
ForeignObject.from_fields/to_fields is not a tuple.
2023-09-11Fixed #34642 -- Added File.open() support for *args and **kwargs.Yves Weissig
2023-09-09Fixed #34820 -- Fixed migrations crash when changing a ForeignObject field.donghao
2023-09-08Fixed #34816 -- Fixed GenericForeignKey crash when checking cache for ↵Oguzhan Akan
primary keys with different types.