Commit Graph

31150 Commits

Author SHA1 Message Date
Vlastimil Zíma 08c5a78726
Fixed #34098 -- Fixed loss of precision for Decimal values in floatformat filter.
Regression in 12f7928f5a.
2022-10-24 12:59:34 +02:00
Marcelo Galigniana 1d6948096f Fixed flaky test_ForeignKey_using_to_field test. 2022-10-24 11:54:00 +02:00
Smile 83cdcac355
Improved "rebase" example for upstream changes in working with Git docs. 2022-10-24 10:04:38 +02:00
Mariusz Felisiak 577dbcbb4f
Refs #34070 -- Fixed date format in Now() on SQLite.
Regression in 649b28eab6.
2022-10-24 09:11:48 +02:00
Giebisch 3283120cca Fixed #34111 -- Made test runner with --debug-sql format SQL queries. 2022-10-24 08:11:30 +02:00
Smile 5ec64fa481
Corrected curl call in working with Git docs. 2022-10-21 16:12:12 +01:00
Ryan Cheley 38936f6a0c
Fixed typo in docs/ref/models/querysets.txt. 2022-10-21 16:02:39 +01:00
HieuPham9720 3e928de8ad
Skipped scrypt tests when OpenSSL 1.1+ is not installed. 2022-10-20 18:50:48 -07:00
Diane DeMers Chen a16132a9c4
Updated UTC uses to datetime.timezone.utc in docs. 2022-10-20 15:52:45 -07:00
Carlton Gibson 5c2c7277d4 Fixed #34085 -- Made management commands don't use black for non-Python files.
Bug in d113b5a837.

Co-authored-by: programmylife <acmshar@gmail.com>
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2022-10-20 13:38:31 -07:00
Simon Charette d62563cbb1
Fixed #34105 -- Fixed crash of ordering by nested selected expression.
This stops ordering by nested selected references. It's not supported on
PostgreSQL and not required to support psycopg3.

Regression in 04518e310d.

Thanks Matt Westcott for the report.
2022-10-18 17:31:45 -07:00
Collin Anderson 78470043ae
Fixed #34102 -- Limited wrapping long names to admin dashboard.
Regression in 15682cb003.
2022-10-18 12:16:31 -07:00
Colm O'Connor 37c5b8c07b
Fixed #34093 -- Changed width/height of switch button icons to use rem units in admin. 2022-10-14 06:10:50 +02:00
Mariusz Felisiak 7c884afe5a
Refs #23919 -- Updated obsolete buffer() references to memoryview().
Obsolete since 8cdc84726e.
2022-10-13 19:49:57 +02:00
Alan D. Snow da2621c3df
Updated example of creating GEOSGeometry from WKB to use memoryview. 2022-10-13 13:21:49 +02:00
Marcelo Galigniana 2a2503c2c1 Completed test coverage for django.core.paginator. 2022-10-13 12:27:41 +02:00
Marcelo Galigniana 9101adc8ba Removed unused branch in Paginator.validate_number().
Unused since 96cf3656c4.
2022-10-13 12:11:39 +02:00
Sergio 94e7f471c4 Fixed #34069 -- Made LocaleMiddleware respect language from requests when i18n patterns are used. 2022-10-13 10:38:26 +02:00
Mariusz Felisiak 004f985b91
Refs #34059 -- Doc'd lack of support for validation of constraints with JSONFields.
Thanks Dan LaManna for the report.
2022-10-12 11:50:13 +02:00
Rasmus Magnell c4aac2ac1e Fixed #34042 -- Improved accessibility of admin's navigation sidebar. 2022-10-12 10:21:17 +02:00
Paolo Melchiorre 7c9d0c31d5
Fixed #34086 -- Confirmed support for PostGIS 3.3. 2022-10-12 09:04:32 +02:00
Marcelo Galigniana f30c7e381c
Completed test coverage for contenttypes models. 2022-10-11 05:38:39 +02:00
Mariusz Felisiak da8fa76413
Fixed #34081 -- Reverted "Fixed #33994 -- Corrected position of extrastyle and extrahead blocks in admin base template."
This reverts commit a69b0e9cfe.
2022-10-10 13:43:10 +02:00
Adam Johnson 6402b064a9 Used test client headers in i18n tests. 2022-10-10 11:46:31 +02:00
Mariusz Felisiak 15682cb003
Fixed wrapping of long model names in the admin. 2022-10-10 11:17:02 +02:00
Sarah Boyce 84206607d6
Fixed #32833 -- Fixed ContentTypeManager.get_for_models() crash when using in migrations.
Co-authored-by: Heraldo Lucena <23155511+HMaker@users.noreply.github.com>
2022-10-10 08:57:52 +02:00
Ralph Reid d3579ca112 Fixed #25996 -- Revised performance section in URLs topic docs. 2022-10-10 08:02:35 +02:00
Gregor Gärtner f0c06f8ab7 Refs #33990 -- Renamed TransactionTestCase.assertQuerysetEqual() to assertQuerySetEqual().
Co-Authored-By: Michael Howitz <mh@gocept.com>
2022-10-08 08:07:38 +02:00
Mariusz Felisiak d795259ea9
Replaced assertQuerysetEqual() to assertSequenceEqual()/assertCountEqual() where appropriate.
Follow up to 3f7b327562.
2022-10-07 13:05:35 +02:00
Gregor Gärtner 564b317fb5 Refs #33990 -- Renamed SimpleTestCase.assertFormsetError() to assertFormSetError().
Co-Authored-By: Michael Howitz <mh@gocept.com>
2022-10-07 11:22:16 +02:00
J.V. Zammit fa9ac16c13
Fixed #33797 -- Prioritized cached database backend for cached sessions in docs.
Co-authored-by: Adam Johnson <me@adamj.eu>
2022-10-07 09:39:35 +02:00
Mariusz Felisiak 749cd83e13
Removed hardcoded pks in TestQuerying.test_group_by_order_by_aliases test. 2022-10-07 08:26:41 +02:00
Mariusz Felisiak abc5ca6ab4
Bumped versions in pre-commit and npm configurations. 2022-10-07 08:18:04 +02:00
Shubh1815 7a39a691e1 Fixed #32603 -- Made ModelAdmin.list_editable use transactions. 2022-10-06 20:44:07 +02:00
Simon Charette c6350d594c Refs #30158 -- Removed alias argument for Expression.get_group_by_cols().
Recent refactors allowed GROUP BY aliasing allowed for aliasing to be
entirely handled by the sql.Query.set_group_by and compiler layers.
2022-10-06 12:04:00 +02:00
Simon Charette b7b28c7c18 Refs #31150 -- Enabled implicit GROUP BY aliases.
This ensures implicit grouping from aggregate function annotations
groups by uncollapsed selected aliases if supported.

The feature is disabled on Oracle because it doesn't support it.
2022-10-06 11:51:32 +02:00
Simon Charette 3d734c09ff Refs #33992 -- Refactored subquery grouping logic.
This required moving the combined queries slicing logic to the compiler
in order to allow Query.exists() to be called at expression resolving
time.

It allowed for Query.exists() to be called at Exists() initialization
time and thus ensured that get_group_by_cols() was operating on the
terminal representation of the query that only has a single column
selected.
2022-10-06 11:38:03 +02:00
Simon Charette 04518e310d Refs #33308 -- Enabled explicit GROUP BY and ORDER BY aliases.
This ensures explicit grouping from using values() before annotating an
aggregate function groups by selected aliases if supported.

The GROUP BY feature is disabled on Oracle because it doesn't support it.
2022-10-06 09:34:31 +02:00
Simon Charette c58a8acd41 Fixed #33768 -- Fixed ordering compound queries by nulls_first/nulls_last on MySQL.
Columns of the left outer most select statement in a combined query
can be referenced by alias just like by index.

This removes combined query ordering by column index and avoids an
unnecessary usage of RawSQL which causes issues for backends that
specialize the treatment of null ordering.
2022-10-05 14:04:49 +02:00
Jack Linke 344d31c7e9 Fixed #34071 -- Improved error message for Range(Min/Max)ValueValidator. 2022-10-05 09:41:01 +02:00
Simon Charette a142edcc49 Avoided unnecessary call to .get_source_expressions().
The SQLCompiler._order_by_pairs() generator method yields instances of
OrderBy and not Expression.
2022-10-04 12:29:37 +02:00
Mariusz Felisiak c583418e3e
Removed note about "0" IP address from tutorial.
Tutorial should offer only minimum, necessary, explanation.
2022-10-04 11:51:18 +02:00
Dhanush 9fbb5b5e16 Fixed #34068 -- Corrected output of runserver command for "0" IP address.
Thanks David Sanders for the review.
2022-10-04 10:13:32 +02:00
Carlton Gibson 93d4c9ea1d Added CVE-2022-36359 to security archive. 2022-10-04 10:12:11 +02:00
Carlton Gibson 7a08927323 Added stub release notes for 4.1.3 release. 2022-10-04 09:49:23 +02:00
Adam Johnson e5ea284294 Fixed CVE-2022-41323 -- Prevented locales being interpreted as regular expressions.
Thanks to Benjamin Balder Bach for the report.
2022-10-04 09:10:04 +02:00
David Sanders 4771a1694b Fixed #34012 -- Made QuerySet.order_by() apply transforms on related fields for models with Meta.ordering.
This makes QuerySet.order_by() no longer ignore trailing transforms for
models with Meta.ordering. As a consequence, FieldError is raised in
such cases for non-existent fields.

Thanks to Klaas van Schelven for the report and Mariusz Felisiak for the
review and advice.
2022-10-04 08:19:34 +02:00
Lily Foote 649b28eab6 Fixed #34070 -- Added subsecond support to Now() on SQLite and MySQL. 2022-10-03 12:13:27 +02:00
Mariusz Felisiak f71b0cf769
Refs #32987 -- Relaxed system check for template tag modules with the same name by turning into a warning.
Thanks Claude Paroz for the report.

Regression in 004b4620f6.
2022-10-03 10:52:21 +02:00
David Wobrock 3b4a5b9f97 Fixed #23353 -- Used "raise from" when raising TransactionManagementError.
This change sets the __cause__ attribute to raised exceptions.
2022-10-03 06:08:54 +02:00