1
0
mirror of https://github.com/django/django.git synced 2025-04-08 07:26:41 +00:00

29335 Commits

Author SHA1 Message Date
starryrbs
0e2979e95d [3.2.x] Fixed #32450 -- Fixed crash when ANDing/ORing an empty Q() with not pickleable Q().
Regression in bb0b6e526340e638522e093765e534df4e4393d2.

Backport of 466920f6d726eee90d5566e0a9948e92b33a122e from master
2021-02-18 22:06:36 +01:00
Nick Pope
6897da6096 [3.2.x] Added documentation extlink for bugs.python.org.
Backport of d02d60eb0f032c9395199fb73c6cd29ee9bb2646 from master
2021-02-17 14:25:54 +01:00
Hannes Ljungberg
69a585eb87 [3.2.x] Fixed #32453 -- Added introspection of unique constraint field ordering on SQLite.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>

Backport of 4d99375b46ad03fa4b4795319973046f438328c8 from master
2021-02-17 12:18:18 +01:00
Harm Geerts
b89ce413f2 [3.2.x] Fixed #29052 -- Made test database creation preserve alias order and prefer the "default" database.
This fixes flushing test databases when two aliases point to the same
database.

Use a list() to store the test database aliases so the order remains
stable by following the order of the connections. Also, always use the
"default" database alias as the first alias to accommodate `migrate`.

Previously `migrate` could be executed on a secondary alias which
caused truncating the "default" database.

Backport of 06e5f7ae1639f1e275e7cc1076dc70ca3ebaa946 from master
2021-02-16 13:08:13 +01:00
Chris Jerdonek
65a620948c [3.2.x] Fixed #32437 -- Fixed cleaning up ALLOWED_HOSTS in LiveServerTestCase on setUpClass() failure.
Backport of 694deff82f86e025561dfa724425f67e2ff7cbb7 from master
2021-02-12 11:53:37 +01:00
David Smith
bfc429d993 [3.2.x] Fixed #32438 -- Fixed typo in docs/topics/testing/tools.txt.
Backport of e412b288455dd3ea6f1d65c8ec5d01751e489976 from master
2021-02-12 09:21:07 +01:00
Adam Johnson
f2d955dbe4 [3.2.x] Documented an example custom context processor.
Backport of 0963f184abd96800b76b19a6a181e1b544c7fafe from master
2021-02-11 14:37:27 +01:00
Adam Johnson
2ce4f73241 [3.2.x] Improved pagination documentation
* Link to the topic guide
* Document that page() can raise PageNotAnInteger.

Backport of a57e91adeeef4fe97db3e589b20bf2a30c907e21 from master
2021-02-11 14:20:19 +01:00
Egidijus Macijauskas
aa1aed923b [3.2.x] Fixed #32433 -- Added error message on QuerySet.delete() following distinct().
Backport of 6307c3f1a123f5975c73b231e8ac4f115fd72c0d from master
2021-02-11 09:09:59 +01:00
Egidijus Macijauskas
98ce39b5a3 [3.2.x] Refs #19102 -- Removed flaky test Ticket19102Tests.test_ticket_19102_distinct_on.
The subquery pushdown only happens because another table is involved in
filter. It's not the distinct usage that causes the pushdown.

The distinct('description').order_by('pk') expression is not valid
because SELECT DISTINCT ON must match initial ORDER BY expressions
which is not the case here.

Backport of 4e8ecf0cb6ea36c45edb9cb86f0d63224e08097e from master
2021-02-11 09:09:22 +01:00
Hasan Ramezani
dd14e639ad [3.2.x] Fixed #32431 -- Reversed order of security issues history.
Backport of 17a5e2cff606305fd819a024cf9f450f90202a6f from master
2021-02-10 16:03:24 +01:00
Jordan Bae
9eed258283 [3.2.x] Fixed #32425 -- Fixed adding nullable field with default on MySQL.
Thanks Simon Charette for the review.

Backport of d4ac23bee1c84d8e4610350202ac068fc90f38c0 from master
2021-02-09 08:25:05 +01:00
Anil Khatri
bae685f267 [3.2.x] Fixed #32430 -- Doc'd base class-based views.
Backport of 6ee86a12ee29fcd4f3d7c9f1ad6de8cde4637b06 from master
2021-02-08 17:33:53 +01:00
Anil Khatri
20e0e47f25 [3.2.x] Fixed #32408 -- Doc'd django.views.generic.detail.BaseDetailView.
Backport of de4492fbb1e48f8b258baa182220d4247f345177 from master
2021-02-08 07:08:53 +01:00
Amankumar Singh
d192d751e1 [3.2.x] Fixed #32419 -- Clarified URLconf in example of serving media files.
Backport of 51637222b6eeed81d9ce6f5d24e22e249c605ba3 from master
2021-02-05 15:34:28 +01:00
Mikolaj Rybinski
d881a0ea3b [3.2.x] Fixed #32420 -- Fixed detecting primary key values in deserialization when PK is also a FK.
Backport of 8e90560aa8868a42bb8eda6273595bf0932a6090 from master
2021-02-05 14:19:10 +01:00
Carlton Gibson
f490cde15d [3.2.x] Corrected typo in advice to new contributors.
Backport of e48e78738e224a056df57b7cb08bd48ac0e54f60 from master
2021-02-04 16:02:08 +01:00
Mariusz Felisiak
ff25791d23 [3.2.x] Refs #32074 -- Fixed TextChoices/IntegerChoices crash on Python 3.10.
EnumMeta has a new keyword argument 'boundary' in Python 3.10. This
is a new mechanism that controls how out-of-range / invalid bits are
handled, see https://bugs.python.org/issue38250.

Backport of 5d9b065d3f93de056588dfee6f1776294dd8bab2 from master
2021-02-04 10:51:41 +01:00
GabbyPrecious
cb680b6819 [3.2.x] Refs #32412 -- Adjusted link from tutorial to reference docs.
The writing code index page is a better location for a newer contributor to
land, than the specific patch guidelines subpage.

Backport of aa29c57beea7e8e570f8a597ea806ca3e2b3431d from master
2021-02-04 10:37:36 +01:00
GabbyPrecious
bbd1b3565b [3.2.x] Refs #32412 -- Adjusted beginning of Advice for new contributors.
With the goal of guiding folks to the right destination:

* Improved wording of tutorial call-out.
* Added summary of page purpose.
* Added link to Writing code reference doc.

Backport of e733c9ac1746cedc78efabff340379f1c9ee47da from master
2021-02-04 10:37:15 +01:00
Dan Swain
afe34e7237 [3.2.x] Fixed typos in 3.2 release notes.
Backport of e17bdb953a72f1eae76a914a21ce4e83d3e3b608 from master
2021-02-04 09:56:58 +01:00
Hasan Ramezani
b36beec208 [3.2.x] Fixed #32332 -- Fixed loss of parent with non-numeric pk when saving child after parent.
Follow up to 519016e5f25d7c0a040015724f9920581551cab0.

Backport of 7cba92ec55a5d05450261f375830619870ca84fa from master
2021-02-04 07:08:20 +01:00
Mariusz Felisiak
7d65889345 [3.2.x] Fixed #32403 -- Fixed re-raising DatabaseErrors when using only 'postgres' database.
Thanks Kazantcev Andrey for the report.

Regression in f48f671223a20b161ca819cf7d6298e43b8ba5fe.
Backport of f131841c601b9d4884adcdb284b4213c2ad89231 from master
2021-02-02 21:35:35 +01:00
Brad Solomon
eab0b8b804 [3.2.x] Fixed typo in docs/ref/forms/widgets.txt.
Backport of f9cfd346f0222d86bfbac26ef5455806965bae6b from master
2021-02-01 12:05:22 +01:00
Mariusz Felisiak
b62e767b88 [3.2.x] Added stub release notes for 3.1.7.
Backport of 8d3c3a57174a072479978d60f5ecdb9fd3c2fd23 from master
2021-02-01 10:55:07 +01:00
Mariusz Felisiak
10b25e6722 [3.2.x] Added CVE-2021-3281 to security archive.
Backport of f749148d62ece28d208ab66b109f858215ba090a from master
2021-02-01 10:45:47 +01:00
Mariusz Felisiak
f944f79e55 [3.2.x] Fixed CVE-2021-3281 -- Fixed potential directory-traversal via archive.extract().
Thanks Florian Apolloner, Shai Berger, and Simon Charette for reviews.

Thanks Wang Baohua for the report.

Backport of 05413afa8c18cdb978fcdf470e09f7a12b234a23 from master.
2021-02-01 09:13:37 +01:00
Sandro Covo
0a3d93ffba [3.2.x] Fixed #32345 -- Fixed preserving encoded query strings in set_language() view.
Thanks Johannes Maron for the review.

Backport of 6822aa5c6c3fbec7c5393a05e990865ba59fe167 from master
2021-01-29 12:37:48 +01:00
Tilman Koschnick
18cac6bbfb [3.2.x] Fixed #32392 -- Fixed ExclusionConstraint crash with Cast() in expressions.
Backport of fdfbc66331292def201c9344e3cd29fbcbcd076a from master
2021-01-29 11:26:51 +01:00
Mariusz Felisiak
f4d51e12ae [3.2.x] Fixed GeoIPTest.test04_city() failure with the latest GeoIP2 database.
Backport of 135c800fe6138d7818501a384c0ebbdc5442762c from master
2021-01-29 11:02:28 +01:00
Adam Johnson
52a4882c40 [3.2.x] Modernized custom manager example
Since this example was added 15 years ago in a8ccdd0fcd631e8e928ef20547e1fe3e313dc607, the ORM has gained the ability to do the `COUNT(*)` related query, so do it with the ORM to avoid misleading users that raw SQL is only supported from manager methods.

Backport of 59e503b6708d41a44f2aa320272de3e2ecb5d65c from master
2021-01-28 16:01:46 +01:00
Denis Skulimovskiy
d83249b0b9 [3.2.x] Fixed #32391 -- Used CSS flex properties for changelist filter.
Matched layout adjustment using flex from admin sidebar added in
d24ba1be7a53a113d19e2860c03aff9922efec24.

Filters would become squashed when viewport was
constrained or list display table became too wide.

Backport of 269a76714616fd7ad166a14113f3354bab8d9b65 from master
2021-01-28 15:52:59 +01:00
Illia Volochii
f9b2b1bb3b [3.2.x] Fixed #32389 -- Fixed ResponseHeaders crash when data is not mapping.
Backport of 3c004075b1d4fe4aa1ffc3f7d699dd9525bc6c02 from master
2021-01-28 10:17:33 +01:00
Timothy McCurrach
e95a60bb64 [3.2.x] Fixed #32388 -- Clarified QuerySet.bulk_update() caveat about duplicates for multiple batches.
Backport of 241da3f06ee0c6f436341cda5890b221ac453e3b from master
2021-01-28 08:07:14 +01:00
Adam Johnson
ba71cf38ea [3.2.x] Changed "Don't overuse count() or exists()" example to Python.
Backport of 8a642b88c31787fde612ba72d4b282e1c2444035 from master
2021-01-27 20:47:46 +01:00
Hasan Ramezani
73e7bfc8f5 [3.2.x] Fixed #32290 -- Fixed TemplateNotFound in {% include %} tag for relative path in variable.
Backport of c978dd93fda87c6d2e965d385164c35f1a3e64b8 from master
2021-01-27 11:35:40 +01:00
Carlton Gibson
4dbbe37479 [3.2.x] Fixed #32348, Refs #29087 -- Corrected tutorial for updated deleting inlines UI.
Updated tutorial to match change in 24e540fbd71bd2b0843e751bde61ad0052a811b3
allowing deletion of original extra inlines.

Backport of f4272d000af598018247fe9687dac0fd02a29a7c from master
2021-01-27 08:47:27 +01:00
Simon Charette
9607e3a0cc [3.2.x] Fixed #32369 -- Fixed adding check constraints with pattern lookups and expressions as rhs.
This disables interpolation of constraint creation statements. Since
Constraint.create_sql interpolates its parameters instead of deferring
this responsibility to the backend connection it must disable
connection level parameters interpolation.

Backport of 42e8cf47c7ee2db238bf91197ea398126c546741 from master
2021-01-26 08:20:40 +01:00
Hannes Ljungberg
5d9374b9fb [3.2.x] Refs #26167 -- Corrected OpClass() example in docs.
Backport of 90ddf46ef7b3d775b124d81e1846bec7961c7f1f from master
2021-01-25 09:03:31 +01:00
Jack
c708837a69 [3.2.x] Refs #32372 -- Updated manager name in related objects reference docs.
Follow up to 725c549ae7a34d83447201da7190f8d71c7fc2fc.
Backport of 2b4b6c8af0aae8785bc1347cf1be2e8e70fd5ff3 from master
2021-01-22 20:19:27 +01:00
Jack Aitken
59c63c7f6b [3.2.x] Fixed #32372 -- Made examples in related objects reference docs consistent.
Backport of 725c549ae7a34d83447201da7190f8d71c7fc2fc from master
2021-01-22 06:53:13 +01:00
Mariusz Felisiak
e45b944d69 [3.2.x] Fixed #32367 -- Fixed system check for specifying type of auto-created primary keys for inherited PKs.
Regression in b5e12d490af3debca8c55ab3c1698189fdedbbdb.

Thanks אורי for the report.

Backport of a03a36121d22c8784985c7e45727eddef6a3ea7f from master
2021-01-21 19:38:11 +01:00
Simon Charette
6520ce5251 [3.2.x] Fixed #32374 -- Stopped recording migration application before deferred SQL.
Migrations cannot be recorded in the same transaction as its associated
DDL operations when some of it is deferred until the schema editor
context exits.

Regression in c86a3d80a25acd1887319198ca21a84c451014ad.

Backport of 0c42cdf0d2422f4c080e93594d5d15381d6e955e from master
2021-01-21 07:35:43 +01:00
Simon Charette
900b2ce92b [3.2.x] Refs #29721 -- Simplified migration used to test atomic recording.
This makes sure atomic recording of migration application is used when
the schema editor doesn't defer any statement.

Backport of 533a5835784b95335c8373b6d0b9495b3834e96e from master
2021-01-21 07:35:33 +01:00
Matthias Kestenholz
41405a0b8e [3.2.x] Fixed #32371 -- Doc'd jquery.init.js dependency for admin widgets.
Backport of 7b3ec6bcc8309d5b2003d355fe6f78af89cfeb52 from master
2021-01-20 22:07:40 +01:00
Tom Carrick
4cf4c2df56 [3.2.x] Refs #31259 -- Made various dark theme adjustments.
Backport of f054468cac325e8d8fa4d5934b939b93242a3730 from master
2021-01-20 15:49:25 +01:00
Carlton Gibson
0db73315fd [3.2.x] Bumped version for 3.2 alpha 1 release. 3.2a1 2021-01-19 12:02:47 +01:00
Paul Ganssle
a5d70cca12 [3.2.x] Refs #32365 -- Allowed use of non-pytz timezone implementations.
Backport of 10d126198434810529e0220b0c6896ed64ca0e88 from master
2021-01-19 12:00:40 +01:00
Mariusz Felisiak
de4e854f07 [3.2.x] Corrected versionadded annotations.
Backport of 73ffc73b68d3c1fc1e51f13963718492303a2941 from master
2021-01-19 11:58:37 +01:00
Illia Volochii
8dcb8b9e95 [3.2.x] Fixed #32358 -- Fixed queryset crash when grouping by annotation with Distance()/Area().
Made MeasureBase hashable.

Backport of bef6f7584280f1cc80e5e2d80b7ad073a93d26ec from master
2021-01-18 12:07:30 +01:00