1
0
mirror of https://github.com/django/django.git synced 2024-12-29 12:36:08 +00:00
Commit Graph

31474 Commits

Author SHA1 Message Date
Mariusz Felisiak
67504ea505
Refs #34118 -- Skipped not compatible requirements on daily builds for Python 3.12. 2022-11-16 08:16:40 +01:00
Simon Charette
5c23d9f0c3 Refs #33308 -- Used get_db_prep_value() to adapt JSONFields. 2022-11-15 13:02:36 +01:00
Simon Charette
d87a7b9f4b Refs #33308 -- Stopped inheriting from FieldGetDbPrepValueMixin by PostgresOperatorLookup. 2022-11-15 13:02:36 +01:00
Simon Charette
70499b25c7 Fixed #34123 -- Fixed combinator order by alias when using select_related().
Regression in c58a8acd41.

Thanks to Shai Berger for the report and tests.

Co-Authored-By: David Sanders <shang.xiao.sanders@gmail.com>
2022-11-15 10:48:19 +01:00
Simon Charette
7adb0c8b60 Avoided unnecessary usage of RawSQL.
This ensures proper alias quoting.
2022-11-15 10:48:14 +01:00
sarahboyce
7a5307974a Fixed #34099 -- Added release notes for QuerySet.update_or_create() changes.
Follow up to 6cc0f22a73.

Thanks Phil Gyford for the report.
2022-11-14 14:05:43 +01:00
sarahboyce
0678d65722 Refs #34099 -- Doc'd that custom Model.save() should update update_fields kwarg. 2022-11-14 13:43:07 +01:00
David Wobrock
67da22f08e Fixed #34074 -- Added headers argument to RequestFactory and Client classes. 2022-11-14 10:21:51 +01:00
Simon Charette
b181cae2e3 Refs #25307 -- Replaced SQLQuery.rewrite_cols() by replace_expressions().
The latter offers a more generic interface that doesn't require
specialized expression types handling.
2022-11-14 09:05:32 +01:00
Simon Charette
1771998c09 Reduced nesting inside Query.get_aggregation(). 2022-11-14 09:01:21 +01:00
Simon Charette
10037130c1
Refs #28477 -- Fixed handling aliased annotations on aggregation.
Just like when using .annotate(), the .alias() method will generate the
necessary JOINs to resolve the alias even if not selected.

Since these JOINs could be multi-valued non-selected aggregates must be
considered to require subquery wrapping as a GROUP BY is required to
combine duplicated tuples from the base table.

Regression in 59bea9efd2.
2022-11-14 05:45:33 +01:00
Tony Lechner
b088cc2fea
Fixed #34154 -- Made mixin headers consistent in auth docs. 2022-11-14 05:28:27 +01:00
Vasiliy Ivanov
1be7e36f85
Fixed typo in SetPasswordForm()'s docstring. 2022-11-11 09:35:13 +01:00
Simon Charette
a9d2d8d1c3 Refs #28477 -- Reduced complexity of aggregation over qualify queries. 2022-11-11 08:46:08 +01:00
Francesco Panico
99b4f90ec6 Refs #34110 -- Added StorageSettingsMixin. 2022-11-11 07:05:00 +01:00
Francesco Panico
032c09c414 Refs #34110 -- Reorganized django.core.files.storage into a separate module. 2022-11-11 06:59:33 +01:00
Nick Pope
9bd174b9a7 Updated documentation and comments for RFC updates.
- Updated references to RFC 1123 to RFC 5322
  - Only partial as RFC 5322 sort of sub-references RFC 1123.
- Updated references to RFC 2388 to RFC 7578
  - Except RFC 2388 Section 5.3 which has no equivalent.
- Updated references to RFC 2396 to RFC 3986
- Updated references to RFC 2616 to RFC 9110
- Updated references to RFC 3066 to RFC 5646
- Updated references to RFC 7230 to RFC 9112
- Updated references to RFC 7231 to RFC 9110
- Updated references to RFC 7232 to RFC 9110
- Updated references to RFC 7234 to RFC 9111
- Tidied up style of text when referring to RFC documents
2022-11-10 13:52:17 +01:00
Trey Hunner
fad070b07b
Improved readability of string interpolation in frequently used examples in docs. 2022-11-10 13:18:38 +01:00
Márton Salomváry
d6cbf39a1b Fixed #34149 -- Allowed adding deferrable conditional exclusion constraints on PostgreSQL. 2022-11-10 11:07:24 +01:00
David Wobrock
0931d5b087 Improved async request factory and client docs. 2022-11-10 09:29:49 +01:00
Mariusz Felisiak
d6fbfea08d
Added Python 3.12 to daily builds. 2022-11-09 14:04:14 +01:00
Simon Charette
59bea9efd2 Fixed #28477 -- Stripped unused annotations on aggregation.
Also avoid an unnecessary pushdown when aggregating over a query that doesn't
have aggregate annotations.
2022-11-09 13:22:14 +01:00
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