Commit Graph

31202 Commits

Author SHA1 Message Date
Jon Janzen 321ecb40f4 Fixed #34135 -- Added async-compatible interface to related managers. 2022-11-09 10:32:40 +01:00
Marco Marra 41e8931c2c
Fixed typo in BaseModelAdmin.has_delete_permission()'s docstring. 2022-11-08 20:41:29 +01:00
Nick Pope e0fb2a25b9
Used super().execute/executemany() in SQLiteCursorWrapper. 2022-11-08 14:19:59 +01:00
Scott Halgrim c4eaa67e2b Fixed #34063 -- Fixed reading request body with async request factory and client.
Co-authored-by: Kevan Swanberg <kevswanberg@gmail.com>
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2022-11-08 13:53:34 +01:00
Ryan Cheley 8e6ea1d153 Fixed #10070 -- Added support for pyformat style parameters on SQLite.
Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2022-11-08 12:26:39 +01:00
Jon Janzen 7b94847e38 Fixed #34139 -- Fixed acreate(), aget_or_create(), and aupdate_or_create() methods for related managers.
Bug in 58b27e0dbb.
2022-11-08 06:20:10 +01:00
Simon Charette 76e37513e2 Refs #33374 -- Adjusted full match condition handling.
Adjusting WhereNode.as_sql() to raise an exception when encoutering a
full match just like with empty matches ensures that all case are
explicitly handled.
2022-11-07 20:23:53 +01:00
Simon Charette 4b702c832c Refs #33374 -- Added tests for multi-table fast-deletion with filters that match everything. 2022-11-07 20:23:53 +01:00
Florian Apolloner 7990d254b0
Refs #33308 -- Improved adapting DecimalField values to decimal. 2022-11-07 19:34:08 +01:00
Simon Charette 5f09ab8c30 Refs #17144 -- Removed support for grouping by primary key.
No core backend require the feature anymore as it was only added to
support a MySQL'ism that has been deprecated since then.
2022-11-07 12:21:29 +01:00
Simon Charette 041551d716 Fixed #31331 -- Switched MySQL to group by selected primary keys.
MySQL 5.7.15 supports group by functional dependences so there is no
need to special case group by main table primary key anymore and
special case the ONLY_FULL_GROUP_BY sql mode.
2022-11-07 11:36:05 +01:00
Simon Charette 967f8750ab Refs #27849 -- Fixed filtered aggregates crash on filters that match everything. 2022-11-07 09:05:24 +01:00
Simon Charette 77cf70ea96 Refs #27849 -- Added test for filtered aggregates with empty conditions. 2022-11-07 08:57:40 +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 480191244d.

Thanks Michal Čihař for the report.
2022-11-07 06:15:54 +01:00
Adam Johnson 444b6da7cc Refs #33939 -- Improved transaction.on_commit() docs. 2022-11-04 12:20:25 +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 2f73e5406d.

Thanks David Wobrock for the report.
2022-11-04 09:30:23 +01:00
Nick Pope 0f4964535c Removed obsolete references to pysqlite.
Obsolete since 1b06d5e6f6.
2022-11-04 08:03:06 +01:00
Nick Pope 18dd184ef0 Noted that JSON1 extension is enabled by default on SQLite 3.38+. 2022-11-04 08:03:06 +01:00
Bhuvnesh e580b891cb
Refs #33646 -- Moved tests of QuerySet async interface into async tests. 2022-11-03 20:11:19 +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
Ion Alberdi 34d63d5a41 Refs #34080 -- Added tests for __exact lookup when non-nested arrays contain only NULL values. 2022-11-03 06:39:34 +01:00
Joseph Victor Zammit 71e9694856 Fixed #30801 -- Improved guidance for making good use of signals. 2022-11-02 17:21:15 +01:00
Mariusz Felisiak 57c2e5da71
Refs #33984 -- Added test for creating copies of model instances with inherited m2m fields. 2022-11-02 12:30:16 +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
Filip Lajszczak 6103059592 Fixed #34054 -- Created a new fixtures topic.
Moved material from django-admin document into a new document, and
added new material.

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2022-11-02 08:08:02 +01:00
Mariusz Felisiak c765b62e32 Added stub release notes for 4.1.4. 2022-11-01 07:27:30 +01:00
Mariusz Felisiak 635e5643b3 Added release date for 4.1.3. 2022-11-01 06:54:19 +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
Nick Pope 970f61fefb
Removed obsolete doc reference to asyncio.iscoroutinefunction. 2022-10-29 13:34:22 +02:00
Msvstl 67bc2f1b99
Corrected test_update_or_create_with_model_property_defaults test. 2022-10-29 13:27:10 +02: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 3d734c09ff.

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
Mariusz Felisiak d559cb02da
Refs #19215 -- Fixed admin_widgets tests if Pillow isn't installed.
Follow up to c0fc1b5302.
2022-10-27 08:41:03 +02:00
Mariusz Felisiak eb6cc01d0f
Refs #33173 -- Doc'd Python 3.11 compatibility in Django 4.1.x. 2022-10-26 20:10:33 +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
Simon Willison 022a864a5d
Fixed #34109 -- Updated instructions for running with Uvicorn.
Co-authored-by: Paolo Melchiorre <paolo@melchiorre.org>
2022-10-26 11:51:15 +02:00
Mariusz Felisiak e51c998f8d
Refs #33173 -- Added Python 3.11 to classifiers and tox.ini. 2022-10-26 10:25:07 +02:00
Mariusz Felisiak 2e82fa54ca Refs #33173 -- Used Python 3.11 for GitHub actions. 2022-10-26 09:42:51 +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 02940ebce1
Bumped gh-problem-matcher-wrap version to 1.0.2. 2022-10-26 08:18:47 +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