1
0
mirror of https://github.com/django/django.git synced 2024-12-26 19:16:11 +00:00
Commit Graph

30002 Commits

Author SHA1 Message Date
Mariusz Felisiak
01eed04155
Used Ubuntu 18.04 for docs GitHub action. 2021-07-29 11:54:14 +02:00
Jonathan Davis
4c6a6d5ac7
Fixed #23895 -- Prevented pickling of ResolverMatch.
Pickling a ResolverMatch did not work correctly in many cases,
especially with CBVs and URLResolvers in the list of tried URL paths.
2021-07-29 07:04:56 +02:00
Abhyudai
85d47a58bf
Made minor edits to QuerySet.update_or_create() docs. 2021-07-29 06:51:09 +02:00
David Smith
1024b5e74a Fixed 32956 -- Lowercased spelling of "web" and "web framework" where appropriate. 2021-07-29 06:24:12 +02:00
David Smith
acde917456
Refs #32956 -- Lowercased "internet" and "email" where appropriate. 2021-07-28 12:56:56 +02:00
Pēteris Caune
c258918a03 Fixed typo in docs/ref/contrib/admin/index.txt. 2021-07-28 12:20:17 +02:00
chrishna1
033636286a Fixed #32959 -- Moved tests URLs to validators.tests. 2021-07-28 11:39:36 +02:00
Keryn Knight
9662193aea Refs #32946 -- Changed internal usage of dynamic Q() objects construction to use non-kwargs initialization.
This prefers non-kwargs construction of dynamically generated Q()
objects to create a single Q() object instead of many and then
combining them, where possible.
2021-07-28 09:38:46 +02:00
Keryn Knight
5b8ef8aa5b Refs #32946 -- Changed Query.add_filter() to take two arguments. 2021-07-28 09:38:42 +02:00
Chris Jerdonek
5fee36973c
Optimized BaseDatabaseSchemaEditor._effective_default() a bit,
This eliminates an unneeded call to datetime.now() when
field.get_internal_type() equals "DateTimeField".
2021-07-28 08:12:01 +02:00
Chris Jerdonek
fe074c96a3 Refs #32962 -- Simplified NULL logic in BaseDatabaseSchemaEditor._iter_column_sql(). 2021-07-27 20:10:25 +02:00
Chris Jerdonek
809c45ea3c Fixed #32962 -- Consolidated string concatenations in BaseDatabaseSchemaEditor.column_sql(). 2021-07-27 20:10:20 +02:00
Chris Jerdonek
6559a55eed Fixed #32933 -- Documented BoundField.initial as preferred over Form.get_initial_for_field(). 2021-07-27 16:47:09 +02:00
David Smith
1cba320786
Refs #32956 -- Changed "afterwards" to "afterward" in docs and comments.
This also removes unnecessary comments with the previous spelling.

AP Stylebook has a short entry to advise the preferred spelling for
"en-us". "Afterwards" is preferred in British English.
2021-07-27 10:41:51 +02:00
Jordan Bae
3d9040a50b Refs #32743 -- Fixed recreation of foreign key constraints when altering type of referenced primary key with MTI.
Follow up to 325d7710ce.
2021-07-27 07:30:33 +02:00
Mariusz Felisiak
11879530a3
Updated Python license for 2021. 2021-07-27 07:05:46 +02:00
abhiabhi94
5a634a7b6f Fixed #32906 -- Added docs and tests for using key and index lookups on JSONBAgg results.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-07-26 11:23:51 +02:00
David Wobrock
325d7710ce Fixed #32743 -- Added foreign key altering when altering type of referenced primary key with MTI. 2021-07-26 08:51:56 +02:00
abhiabhi94
f876c7d08e Fixed #32957 -- Improved visibility of arguments sections in Model.save() docs. 2021-07-26 07:23:01 +02:00
Tom Wojcik
20226fcd46 Fixed #32947 -- Fixed hash() crash on reverse M2M relation when through_fields is a list.
Regression in c32d8f33d8.
2021-07-26 06:09:29 +02:00
Virtosu Bogdan
00ea883ef5 Fixed #32329 -- Made CsrfViewMiddleware catch more specific UnreadablePostError.
Thanks Chris Jerdonek for the review.
2021-07-23 13:10:41 +02:00
Virtosu Bogdan
852fa7617e Refs #32329 -- Allowed specifying request class in csrf_tests test hooks. 2021-07-23 12:13:31 +02:00
Nick Pope
6b513f0137
Fixed #32913 -- Made watchman reloader tests less flaky. 2021-07-23 11:40:57 +02:00
Chris Jerdonek
3cfcb8cbc8 Refs #32902 -- Moved ensure_csrf_cookie_view after protected_view. 2021-07-23 07:09:36 +02:00
Chris Jerdonek
a2e1f1e295 Fixed #32902 -- Fixed CsrfViewMiddleware.process_response()'s cookie reset logic.
Thanks Florian Apolloner and Shai Berger for reviews.
2021-07-23 07:08:45 +02:00
Chris Jerdonek
311401d9a2 Refs #32902 -- Added CSRF test when rotate_token() is called between resetting the token and processing response. 2021-07-23 06:56:53 +02:00
Abhyudai
019424e44e
Fixed #32950 -- Removed myproject from imports in admin docs where appropriate. 2021-07-23 06:19:02 +02:00
ryowright
1783b3cb24 Fixed #32275 -- Added scrypt password hasher.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-07-22 12:40:33 +02:00
Wu Haotian
65b880b726 Fixed #32930 -- Fixed URLValidator when port numbers < 10. 2021-07-22 11:58:28 +02:00
Wu Haotian
b96cc7f85e Added more test cases with port numbers for URLValidator. 2021-07-22 11:58:28 +02:00
Mariusz Felisiak
83022d279c
Refs #32508 -- Raised TypeError/ValueError instead of using "assert" in encode() methods of some password hashers. 2021-07-22 09:42:07 +02:00
Nick Pope
c35b81b864 Fixed #32951 -- Removed Query.where_class & co.
Unused since 3caf957ed5.
2021-07-22 08:49:20 +02:00
Carlton Gibson
012f38f959 Refs #32949 -- Adjusted release note wording. 2021-07-21 11:34:47 +02:00
yakimka
c542d0a072 Fixed #32949 -- Restored invalid number handling in DecimalField.validate().
DecimalField must itself validate() values, such as NaN, which cannot be
passed to validators, such as MaxValueValidator, during the
run_validators() phase.

Regression in cc3d24d7d5.
2021-07-21 10:20:24 +02:00
David Wobrock
fd999318ad Fixed #32704 -- Fixed list of deferred fields when chaining QuerySet.defer() after only(). 2021-07-20 12:15:29 +02:00
David Wobrock
96706d76cd Added more tests for chaining QuerySet.defer() after only(). 2021-07-20 12:14:28 +02:00
Keryn Knight
6a970a8b46
Fixed #32944 -- Avoided unnecessary WhereNode.add() calls.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-07-20 11:59:21 +02:00
Keryn Knight
ff661dbd50 Refs #32940 -- Removed unnecessary branch in Node.add().
The "data in self.children" branch was causing data.__eq__ to be
called for each entries in "self.children" which resulted in a huge
slowdown during queryset construction.

It's purpose was to prevent queries of the form
    Model.objects.filter(foo='bar').filter(foo='bar')
from resulting in
    WHERE foo='bar' AND foo='bar'
but it's not covered by the suite and has arguable performance benefits
since it's not very common and SQL engines are usually very good at
folding/optimizing these.

See also #32632 for prior discussion around comparing data to the
Node's children.

Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2021-07-20 07:19:28 +02:00
Keryn Knight
fb35e0a2fe Refs #32940 -- Removed Node.add()'s unused squash parameter.
Unused since its introduction in d3f00bd570.

Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2021-07-20 07:19:28 +02:00
Nick Pope
fee8734596 Refs #10929 -- Deprecated forced empty result value for PostgreSQL aggregates.
This deprecates forcing a return value for ArrayAgg, JSONBAgg, and
StringAgg when there are no rows in the query. Now that we have a
``default`` argument for aggregates, we want to revert to returning the
default of ``None`` which most aggregate functions return and leave it
up to the user to decide what they want to be returned by default.
2021-07-19 13:41:16 +02:00
Nick Pope
501a8db465 Fixed #10929 -- Added default argument to aggregates.
Thanks to Simon Charette and Adam Johnson for the reviews.
2021-07-19 13:04:27 +02:00
Keryn Knight
59942a66ce Fixed #32941 -- Removed get_format_modules()'s unused reverse argument.
Unused since 0d8b523422.
2021-07-19 11:42:20 +02:00
Nick Pope
37ec8721df
Fixed #32942 -- Confirmed support for PostGIS 3.1. 2021-07-19 06:49:41 +02:00
Nick Pope
e21daa4e4c
Removed unnecessary tuple construction in Node.__eq__(). 2021-07-19 06:38:35 +02:00
Chris Jerdonek
f3825ee050
Fixed wording of AuthViewsTestCase's docstring. 2021-07-19 06:36:20 +02:00
Jacob Walls
66058c5758 Fixed typo in docs/ref/databases.txt. 2021-07-19 06:10:34 +02:00
Jacob Walls
56f9579105 Fixed #32655 -- Deprecated extra_tests argument for DiscoverRunner.build_suite()/run_tests(). 2021-07-16 20:46:41 +02:00
Jacob Walls
00c724f2f2
Fixed typo in docs/releases/3.1.13.txt. 2021-07-16 20:30:21 +02:00
Haki Benita
59404e8cfe Fixed typo in docs/topics/signals.txt. 2021-07-16 20:25:36 +02:00
Chris Jerdonek
0dc25526d8 Fixed #32924 -- Changed BaseForm.get_initial_for_field() to remove microseconds when needed. 2021-07-16 15:51:20 +02:00