Simon Charette
967f8750ab
Refs #27849 -- Fixed filtered aggregates crash on filters that match everything.
2022-11-07 09:05:24 +01:00
Bhuvnesh
123b1d3fcf
Fixed #34137 -- Made Model.refresh_from_db() clear cached generic relations.
...
Thanks Simon Charette for the implementation idea.
2022-11-07 08:06:30 +01:00
Daniel Ivanov
5eab4d1924
Fixed #34088 -- Fixed Sitemap.get_latest_lastmod() crash with empty items.
...
Bug in 480191244d12fefbf95854b2b117c71ffe44749a.
Thanks Michal Čihař for the report.
2022-11-07 06:15:54 +01:00
LightDiscord
e20c9eb60a
Fixed #27654 -- Propagated alters_data attribute to callables overridden in subclasses.
...
Thanks Shai Berger and Adam Johnson for reviews and the implementation
idea.
2022-11-04 11:08:58 +01:00
jer
5a7f3213ae
Refs #34095 -- Changed height of form controls to use rem units in admin.
...
Co-authored-by: ja <ja@ja.com>
2022-11-04 09:57:32 +01:00
Mariusz Felisiak
7b0e9ea53c
Fixed #34138 -- Avoided table rebuild when adding inline m2m fields on SQLite.
...
Regression in 2f73e5406d54cb8945e187eff302a3a3373350be.
Thanks David Wobrock for the report.
2022-11-04 09:30:23 +01:00
Nick Pope
0f4964535c
Removed obsolete references to pysqlite.
...
Obsolete since 1b06d5e6f6be8e567ce78c892c485af039830d7d.
2022-11-04 08:03:06 +01:00
Ion Alberdi
3dc9f3ac69
Fixed #34080 -- Fixed __exact lookup when nested arrays contain only NULL values.
...
Thanks jerch and David Sanders for reviews.
2022-11-03 06:59:49 +01:00
DevilsAutumn
d5bcdf858d
Fixed #34112 -- Added async-compatible interface to Model methods.
...
Thanks Adam Johnson for the review.
2022-11-02 09:14:17 +01:00
Simon Charette
f47fec31f8
Refs #33768 -- Fixed ordering compound queries by NULLs on SQLite < 3.30.
...
The lack of support for native nulls last/first on SQLite 3.28 and 3.29
requires the compound query to be wrapped for emulation layer to work
properly.
2022-11-01 06:19:22 +01:00
Nick Pope
2bc47d7fe9
Avoided assignment followed by immediate return.
...
Identified using the following command:
$ pcre2grep --line-number --multiline --recursive \
"(?s)(\n +)(\w+) = [^\n]+\1return \2;?$" \
django docs extras js_tests scripts tests
2022-10-31 12:31:13 +01:00
Nick Pope
d3cb91db87
Used more augmented assignment statements.
...
Identified using the following command:
$ git grep -I '\(\<[_a-zA-Z0-9]\+\>\) *= *\1 *[-+/*^%&|<>@]'
2022-10-31 12:30:13 +01:00
David Wobrock
a320aab512
Fixed #16211 -- Added logical NOT support to F expressions.
2022-10-31 09:55:51 +01:00
Francesco Panico
c01e76c95c
Fixed #34094 -- Corrected margins in admin headers for RTL languages.
2022-10-31 06:35:55 +01:00
Simon Charette
c2cc80756b
Fixed #34125 -- Fixed sliced QuerySet.union() crash on a single non-empty queryset.
...
The bug existed since sliced query union was added but was elevated to
query union slices by moving the .exists() optimization to the compiler
in 3d734c09ff0138441dfe0a59010435871d17950f.
Thanks Stefan Hammer for the report.
2022-10-29 09:21:25 +02:00
Simon Charette
09397f5cfa
Used Query.is_sliced in SQLCompiler.as_sql().
2022-10-28 08:46:33 +02:00
Simon Kern
de2c2127b6
Fixed #34066 -- Fixed link to password reset view in UserChangeForm.password's help text when using to_field.
...
Co-Authored-By: David Sanders <shang.xiao.sanders@gmail.com>
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2022-10-27 09:23:34 +02:00
Tobias Bengfort
350455b666
Fixed #33606 -- Cleansed sessionid cookie in error reports.
...
Co-authored-by: Simon Charette <charette.s@gmail.com>
2022-10-26 14:39:58 +02:00
Marcelo Galigniana
b440493eaa
Completed test coverage for contrib.auth.forms.
2022-10-26 12:52:18 +02:00
Mariusz Felisiak
80777d30b3
Refs #33173 -- Fixed destroying test databases when running tests in parallel using spawn on Windows.
...
Thanks Simon Willison for inspiration.
2022-10-26 09:42:51 +02:00
Mariusz Felisiak
6d41f5e5ed
Fixed DatabaseFeatures.supports_select_(intersection/difference) on MariaDB and MySQL 8.0.31+.
2022-10-25 20:01:25 +02:00
Marcelo Galigniana
c0fc1b5302
Fixed #19215 -- Fixed rendering ClearableFileInput when editing with invalid files.
...
Thanks Michael Cardillo for the initial patch.
2022-10-25 16:53:52 +02:00
Yuri Konotopov
64e5ef1f17
Fixed #29027 -- Fixed file_move_safe() crash when moving files with SELinux.
...
Thanks Florian Apolloner for the review.
2022-10-24 13:54:51 +02:00
Vlastimil Zíma
08c5a78726
Fixed #34098 -- Fixed loss of precision for Decimal values in floatformat filter.
...
Regression in 12f7928f5a455e330c0a7f19bc86b37baca12811.
2022-10-24 12:59:34 +02:00
Mariusz Felisiak
577dbcbb4f
Refs #34070 -- Fixed date format in Now() on SQLite.
...
Regression in 649b28eab6765cd6b2b40c779a18ecafc99b43d7.
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
Carlton Gibson
5c2c7277d4
Fixed #34085 -- Made management commands don't use black for non-Python files.
...
Bug in d113b5a837f726d1c638d76c4e88445e6cd59fd5.
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 04518e310d4552ff7595a34f5a7f93487d78a406.
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 15682cb0034242fcdfe333cf399d62ab70c3a978.
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 8cdc84726e13da4c796db614765658835d4786a1.
2022-10-13 19:49:57 +02:00
Marcelo Galigniana
9101adc8ba
Removed unused branch in Paginator.validate_number().
...
Unused since 96cf3656c48f6c42714a70b4546bc42f7b904185.
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
Rasmus Magnell
c4aac2ac1e
Fixed #34042 -- Improved accessibility of admin's navigation sidebar.
2022-10-12 10:21:17 +02:00
Mariusz Felisiak
da8fa76413
Fixed #34081 -- Reverted "Fixed #33994 -- Corrected position of extrastyle and extrahead blocks in admin base template."
...
This reverts commit a69b0e9cfe0af7cd2deaf55c069453c4c4598604.
2022-10-10 13:43:10 +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
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
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
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
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
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