Thank you Claude Paroz for the report.
Regression in 85366fbca723c9b37d0ac9db1d44e3f1cb188db2.
Backport of 182f262b15882649bbc39d769f9b721cf3660f6f from main.
The logic allowing UniqueConstraint(fields).validate to preserve backward
compatiblity with Model.unique_error_message failed to account for cases where
the constraint might not be attached to a model which is a common pattern
during testing.
This changes allows for arbitrary UniqueConstraint(fields) to be tested in
isolation without requiring actual models backing them up.
Co-authored-by: Mark G <mark.gensler@protonmail.com>
Backport of 13922580cccfb9ab2922ff4943dd39da56dfbd8c from main.
Accessing generated field values on unsaved models caused a crash when
validating CheckConstraints and UniqueConstraints with expressions.
Backport of 1005c2abd1ef0c156f449641e38c33e473989d37 from main.
Follow-up to 65ad4ade74dc9208b9d686a451cd6045df0c9c3a which added
counterintuitive to the wordlist. Removes unneeded (antiquated)
hyphenated usages.
See e.g. https://www.merriam-webster.com/dictionary/counterintuitive
Backport of 704192e478885762411252979021771ba23b8adb from main.
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>
Backport of 28522c3c8d5eb581347aececc3ac61c134528114 from main.
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 11393ab1316f973c5fbb534305750740d909b4e4.
Backport of f4a08b6ddfcacadfe9ff8364bf1c6c54f5dd370f from main.
Modified example to use python standard library function
to lower the case of the string.
Backport of 136a5f94099e428dd57572ebd16905fb25ef227e from main.
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>
Backport of 4686541691dbe986f58ac87630c3b7a04db4ff93 from main.
The DjDT "handle" isn't visible on the polls application as the templates
are missing <body> tags for brevity.
Backport of 72b7aecbbfbec0ceb1a829eef82a68d7283df604 from main.
This avoids passing "blank=False" and "srid=4326" to field classes,
which are the default values, and removes special treatment for the
"blank" parameter.
Backport of a0c44d4e23f8f509757f97f28fbbb1ced3382361 from main.
MySQL doesn't support spatial indexes on NULL columns, so there is no
point in removing them.
Backport of 20c2d625d3d5062e43918d1d7b6f623202491dd4 from main.
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>
Backport of 38ad710aba885ad26944ff5708ce1a02a446d2d3 from main.