Commit Graph

32760 Commits

Author SHA1 Message Date
Jaap Roes f0d05a747f Fixed #35564 -- Improved readability of subclass identification. 2024-06-27 13:08:14 +02:00
nessita e56a32b89b
Fixed 35561 -- Made *args and **kwargs parsing more strict in Model.save()/asave(). 2024-06-26 12:13:17 -03:00
raffaella 88966bc2fe Added references to the Django Discord server inside the FAQ docs. 2024-06-26 12:37:17 +02:00
Sarah Boyce 72b7b59680 Optimized admin docs images. 2024-06-25 17:45:20 -03:00
Sarah Boyce a6dde9fbd5 Refs #35380 -- Updated screenshots in intro docs. 2024-06-25 17:45:20 -03:00
Sarah Boyce e510bb1ab1
Fixed #35558 -- Increased inline H3 headers color prominence in admin change page. 2024-06-25 14:03:21 -03:00
Adam Johnson 28522c3c8d
Fixed #35554, Refs #35060 -- Corrected deprecated *args parsing in Model.save()/asave().
The transitional logic added to deprecate the usage of *args for
Model.save()/asave() introduced two issues that this branch fixes:
 * Passing extra positional arguments no longer raised TypeError.
 * Passing a positional but empty update_fields would save all fields.

Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2024-06-25 13:12:10 -03:00
nessita bcc327aa32
Refs #35380 -- Updated screenshots in admin docs.
When listing users, ensure that user first and last name are diverse.
2024-06-25 10:58:36 -03:00
Simon Charette 2a7497b036 Used Query.add_annotation where appropriate.
This avoids manual .annotations and .append_annotation_mask manipulations.
2024-06-25 14:02:20 +02:00
arjunomray d9bd58c3b8 Fixed #35540 -- Fixed the padding on admin login page. 2024-06-25 11:35:07 +02:00
lufafajoshua 136a5f9409 Fixed #34886 -- Modified sample use of lazy in delayed translations.
Modified example to use python standard library function
to lower the case of the string.
2024-06-25 08:59:38 +02:00
Claude Paroz 4686541691
Migrated setuptools configuration to pyproject.toml.
This branch migrates setuptools configuration from setup.py/setup.cfg to
pyproject.toml. In order to ensure that the generated binary files have
consistent casing (both the tarball and the wheel), setuptools version
is limited to ">=61.0.0,<69.3.0".

Configuration for flake8 was moved to a dedicated .flake8 file since
it cannot be configured via pyproject.toml.

Also, __pycache__ exclusion was removed from MANIFEST and the
extras/Makefile was replaced with a simpler build command.

Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2024-06-24 15:34:43 -03:00
lufafajoshua 3ac0e43207 Fixed #35306 -- Documented fallback localization formats in templates when localization is disabled. 2024-06-24 18:06:44 +02:00
Sarah Boyce f1705c8780 Fixed #35545, Refs #32833 -- Fixed ContentTypeManager.get_for_models() crash in CreateModel migrations.
Thank you to Csirmaz Bendegúz for the report and Simon Charettes for the review.
2024-06-24 10:20:11 +02:00
AjmalPonneth 2a082d827d Fixed #35547 -- Added reset_queries to django.db.__all__. 2024-06-24 10:11:07 +02:00
Tim Graham 7ba2a0db20
Fixed Number.__str__() crash when float/decimal_value is None in expressions tests models. 2024-06-21 16:51:41 -03:00
Rosana Rufer 72b7aecbbf Fixed #35461 -- Updated misleading django-debug-toolbar instructions.
The DjDT "handle" isn't visible on the polls application as the templates
are missing <body> tags for brevity.
2024-06-21 12:01:34 +02:00
Ronny Vedrilla 5fef6d2445 Fixed #35528 -- Added EmailMultiAlternatives.body_contains() helper method. 2024-06-21 12:00:56 +02:00
Sarah Boyce 7a0cd09f9f Cleaned up EmailMultiAlternatives docs. 2024-06-21 09:43:10 +02:00
Mariusz Felisiak 20c2d625d3 Refs #35074 -- Avoided failed attempts to remove spatial indexes on nullable fields on MySQL.
MySQL doesn't support spatial indexes on NULL columns, so there is no
point in removing them.
2024-06-20 11:44:44 +02:00
Jake Howard aba0e541ca Fixed #35537 -- Changed EmailMessage.attachments and EmailMultiAlternatives.alternatives to use namedtuples.
This makes it more descriptive to pull out the named fields.
2024-06-20 09:43:40 +02:00
Vaarun Sinha 9691a00d58 Refs #35404 -- Fixed padding of admin fieldset checkbox label. 2024-06-20 09:39:22 +02:00
John Higgins 60acad933d Fixed #35441 -- Documented Context and RequestContext keyword arguments. 2024-06-20 09:34:55 +02:00
Baptiste Mispelon 62300b81cf Fixed #12978 -- Added support for RSS feed stylesheets. 2024-06-18 17:25:43 +02:00
stefan.ivic ce1ad98565 Fixed #35505 -- Added extrabody block to admin/base.html. 2024-06-18 16:49:53 +02:00
Mariusz Felisiak a0c44d4e23 Simplified OperationTestCase.alter_gis_model() test hook a bit.
This avoids passing "blank=False" and "srid=4326" to field classes,
which are the default values, and removes special treatment for the
"blank" parameter.
2024-06-18 12:03:57 +02:00
Sarah Boyce 1b21feeb7b Restructured the EmailMultiAlternatives docs. 2024-06-18 11:22:49 +02:00
Alexander Lötvall 38ad710aba Fixed #35483 -- Added NUL (0x00) character validation to ModelChoiceFields.
Applied the ProhibitNullCharactersValidator to ModelChoiceField and ModelMultipleChoiceField.

Co-authored-by: Viktor Paripás <viktor.paripas@gmail.com>
Co-authored-by: Vasyl Dizhak <vasyl@dizhak.com>
Co-authored-by: Arthur Vasconcelos <vasconcelos.arthur@gmail.com>
2024-06-17 12:19:26 +02:00
Mariusz Felisiak fa78481467 Refs #34881 -- Fixed OperationTests.test_rename_m2m_field_with_2_references() test on Oracle. 2024-06-14 19:52:09 +02:00
Mariusz Felisiak 4ee68bb4f5 Fixed mail.tests.MailTests.test_backend_arg() test on Python 3.13+.
There is no point in asserting Python error messages.
2024-06-14 13:20:54 +02:00
Anže Pečar e99187e5c9 Fixed #34881 -- Fixed a crash when renaming a model with multiple ManyToManyField.through references on SQLite.
Thank you to dennisvang for the report and Jase Hackman for the test.

Co-authored-by: Jase Hackman <jase.hackman@zapier.com>
2024-06-13 17:49:22 +02:00
Madalin Popa d28626ecf8 Fixed #35488 -- Fixed BaseModelFormSet.validate_unique() crash due to unhashable type. 2024-06-13 16:21:53 +02:00
George Y. Kussumoto 2a32b23382 Fixed #35417 -- Updated BaseContext.new() with values to create a context that can be flattened. 2024-06-13 14:22:40 +02:00
lufafajoshua 8733e9af99 Fixed #35470 -- Separated i18n and l10n globalization settings docs. 2024-06-13 09:09:46 +02:00
lufafajoshua e2428292ab Fixed #35401 -- Documented the conditional_page() decorator. 2024-06-12 13:11:29 +02:00
lufafajoshua 708b01c795 Refs #35401 -- Linked the CsrfViewMiddleware docs to the csrf_protect() decorator. 2024-06-12 13:11:29 +02:00
Devin Cox 719a42b589 Fixed #34789 -- Prevented updateRelatedSelectsOptions from
adding entries to filter_horizontal chosen box.

Co-authored-by: yokeshwaran1 <yokesh440@yahoo.com>
2024-06-12 13:09:04 +02:00
Andreu Vallbona f812b927a5
Moved confirmation about dev server running to earlier in tutorial 1. 2024-06-09 14:51:40 -03:00
Andreu Vallbona 85240139ca Replaced usage of "patch" with more precise terms in faq, howto, and intro docs. 2024-06-09 14:38:04 -03:00
Andreu Vallbona 3556f63c4c
Simplified tutorial 1 when describing how to run the dev server. 2024-06-09 04:42:21 -03:00
Ismael 6efbeb997c
Fixed #35503 -- Removed distracting PHP reference in tutorial 1. 2024-06-08 09:41:41 -03:00
Natalia adae619426 Updated release date for Django 5.0.7. 2024-05-31 10:45:30 -03:00
Fabian Braun 339977d444 Fixed #35477 -- Corrected 'required' errors in auth password set/change forms.
The auth forms using SetPasswordMixin were incorrectly including the
'This field is required.' error when additional validations (e.g.,
overriding `clean_password1`) were performed and failed.
This fix ensures accurate error reporting for password fields.

Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2024-05-30 16:31:01 -03:00
Mariusz Felisiak 0f694ce2eb
Made cosmetic edits to code snippets reformatted with blacken-docs. 2024-05-30 09:42:05 -03:00
Jake Howard ff308a0604
Fixed 35467 -- Replaced urlparse with urlsplit where appropriate.
This work should not generate any change of functionality, and
`urlsplit` is approximately 6x faster.

Most use cases of `urlparse` didn't touch the path, so they can be
converted to `urlsplit` without any issue. Most of those which do use
`.path`, simply parse the URL, mutate the querystring, then put them
back together, which is also fine (so long as urlunsplit is used).
2024-05-29 10:48:27 -03:00
samruddhiDharankar 02dab94c7b Fixed #35473 -- Fixed CVE number in security archive.
Updated to CVE-2009-3695 from CVE-2009-3965.
2024-05-29 09:26:07 +02:00
Carlton Gibson f4a08b6ddf
Refs #35059 -- Used asyncio.Event in ASGITest.test_asyncio_cancel_error to enforce specific interleaving.
Sleep call leads to a hard to trace error in CI. Using an Event is
more deterministic, and should be less prone to environment
variations.

Bug in 11393ab131.
2024-05-28 14:36:34 -03:00
Jacob Walls 99f23eaabd Fixed #35469 -- Removed deferred SQL to create index removed by AlterField operation. 2024-05-28 12:44:07 +02:00
Simon Törnqvist d3a7ed5bcc Fixed #35443 -- Changed ordinal to return negative numbers unchanged.
Previously, `-1` was converted to `"-1th"`. This has been updated to
return negative numbers "as is", so that for example `-1` is
converted to `"-1"`. This is now explicit in the docs.

Co-authored-by: Martin Jonson <artin.onson@gmail.com>
2024-05-27 10:54:25 +02:00
Mariusz Felisiak b049bec7cf Fixed #35479 -- Dropped support for PostgreSQL 13 and PostGIS 3.0. 2024-05-27 09:49:25 +02:00