0
0
mirror of https://github.com/django/django.git synced 2024-11-29 14:46:18 +01:00
Commit Graph

29510 Commits

Author SHA1 Message Date
Hannes Ljungberg
eab71f7690 Fixed #32686 -- Removed unnecessary semicolon on collected multiline SQL for RunSQL. 2021-04-27 08:01:07 +02:00
Hannes Ljungberg
95754dbc9b Refs #32686 -- Added tests for adding a semicolon when collecting SQL for RunSQL. 2021-04-27 07:59:41 +02:00
Zain Patel
4e5bbb6ef2 Fixed #32681 -- Fixed VariableDoesNotExist when rendering some admin template.
Regression in 84609b3205.
2021-04-26 07:08:16 +02:00
Mariusz Felisiak
af609c2f4d
Fixed isolation of test_rename_table_renames_deferred_sql_references(). 2021-04-26 06:11:13 +02:00
Mariusz Felisiak
0aacbdcf27
Refs #32673 -- Fixed lookups crash when comparing against lookups on Oracle.
Follow up to 170b006ce8.
2021-04-23 16:32:53 +02:00
Simon Charette
170b006ce8 Fixed #32673 -- Fixed lookups crash when comparing against lookups on PostgreSQL.
Regression in 3a505c70e7.

Nonlitteral right-hand-sides of lookups need to be wrapped in
parentheses to avoid operator precedence ambiguities.

Thanks Charles Lirsac for the detailed report.
2021-04-23 15:38:32 +02:00
Clumart.G
67bb1f516c
Refs #28034 -- Corrected docs example in contributing tutorial. 2021-04-23 15:24:16 +02:00
Mariusz Felisiak
2f435e75ab
Fixed isolation of test_showmigrations_unmigrated_app().
Follow up to 90916f050c.
2021-04-23 10:06:08 +02:00
Mariusz Felisiak
ac2e6e6869
Fixed isolation of i18n.tests.FormattingTests.test_get_custom_format(). 2021-04-22 19:57:27 +02:00
Mariusz Felisiak
90916f050c
Fixed isolation of test_showmigrations_unmigrated_app(). 2021-04-22 17:43:58 +02:00
Mariusz Felisiak
c3278bb71f
Used assertCountEqual() in ExcludeTests.test_exclude_subquery(). 2021-04-22 10:47:10 +02:00
Carlton Gibson
6a7af38b07 Added note to update docs config when creating new stable branch.
django_next_version in docs/conf.py should be bumped when creating a new stable
branch.
2021-04-22 08:08:38 +02:00
Abhyudai
4a77aeb1f8
Fixed #32667 -- Added link to labeling checks in BaseCommand.requires_system_checks docs.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-04-21 16:40:04 +02:00
Chris Jerdonek
0461b7a6b6 Fixed #32662 -- Refactored a generator out of SQLCompiler.get_order_by().
This also renames the `asc` variable to `default_order`, markes the
`desc` variable as unused, fixes a typo in SQLCompiler.get_order_by()
docstring, and reorders some blocks in SQLCompiler._order_by_pairs().
2021-04-21 12:35:49 +02:00
Simon Charette
6d0cbe42c3 Fixed #32650 -- Fixed handling subquery aliasing on queryset combination.
This issue started manifesting itself when nesting a combined subquery
relying on exclude() since 8593e162c9 but
sql.Query.combine never properly handled subqueries outer refs in the
first place, see QuerySetBitwiseOperationTests.test_subquery_aliases()
(refs #27149).

Thanks Raffaele Salmaso for the report.
2021-04-21 09:49:15 +02:00
Mariusz Felisiak
34d1905712
Fixed #32665 -- Fixed caches system check crash when STATICFILES_DIRS is a list of 2-tuples.
Thanks Jared Lockhart for the report.

Regression in c36075ac1d.
2021-04-21 09:41:37 +02:00
Carlton Gibson
5c73fbb6a9 Fixed #32647 -- Restored multi-row select with shift-modifier in admin changelist.
Regression in 30e59705fc.
2021-04-21 08:31:06 +02:00
Tobias Bengfort
54e94640ac Refs #25287 -- Added support for multiplying and dividing DurationField by scalar values on SQLite. 2021-04-20 11:44:41 +02:00
Tobias Bengfort
9e1ccd7283 Refs #25287 -- Added _sqlite_prepare_dtdelta_param() hook. 2021-04-20 10:07:42 +02:00
David Beitey
4bb27c8719
Removed unnecessary line in OrderBy.as_sql().
Unnecessary since 7286eaf681.
2021-04-20 09:47:11 +02:00
François Freitag
6b0b3eafd6 Fixed #32664 -- Made PasswordResetTokenGenerator.secret validation lazy.
Django apps initialization to run management command triggers the admin
autodiscovery. Importing django.contrib.auth.tokens creates an instance
of PasswordResetTokenGenerator which required a SECRET_KEY.

For several management commands, the token generator is unused. It
should only complain about a missing SECRET_KEY when it is used.
2021-04-20 07:34:53 +02:00
François Freitag
b13af4752f Refs #28017 -- Added test for PasswordResetTokenGenerator subclass with a custom secret. 2021-04-20 07:28:06 +02:00
David Smith
3fec16e8ac Fixed #32574 -- Confirmed support for PROJ 8.x. 2021-04-19 20:13:43 +02:00
Chris Jerdonek
413c15ef2e
Refs #32609 -- Simplified test_labels_set construction in runtests.py's setup().
Follow up to 7cf3a5786b.
2021-04-19 11:01:48 +02:00
Chris Jerdonek
a41ed8f1b9 Refs #32611 -- Removed initial "Testing against ..." log message calls from --bisect/--pair runtests options. 2021-04-19 09:18:46 +02:00
Chris Jerdonek
9fa8460081 Fixed #32611 -- Prevented unecessary setup()/teardown() calls when using --bisect/--pair runtests options.
This commit changes runtests.py's bisect_tests() and paired_tests() to
change settings only when necessary, namely when specific test names
aren't provided.
2021-04-19 09:14:35 +02:00
David Wobrock
aa4acc164d Fixed #29899 -- Made autodetector use model states instead of model classes.
Thanks Simon Charette and Markus Holtermann for reviews.
2021-04-16 11:18:10 +02:00
David Wobrock
a67849499a Refs #29899 -- Improved variable names in MigrationAutodetector._detect_changes(). 2021-04-16 10:33:42 +02:00
David Wobrock
fd325b9dee Refs #29899 -- Moved resolve_relation() to django.db.migrations.utils. 2021-04-16 10:33:42 +02:00
Adam Johnson
725ca1fb60 Corrected File, ContentFile, and ImageFile signatures in docs. 2021-04-16 06:17:45 +02:00
Carlton Gibson
e3e2276e6f Fixed #32652 -- Fixed links to new contributors FAQ. 2021-04-15 17:14:22 +02:00
girishsontakke
a815a6a315 Fixed #32641 -- Made DiscoverRunner print the number of found tests.
Thanks Chris Jerdonek for reviews.
2021-04-15 11:42:46 +02:00
Nick Pope
78eaae9bf1
Removed obsolete version check in setup.py.
This was originally added to ensure that Django 2.0+ could not be
installed on Python 2.7 or earlier, in particular where the version of
pip or setuptools being used did not support the python_requires
argument.

Unfortunately, as REQUIRED_PYTHON has been bumped, this check no longer
satisfies its original purpose and could be misleading, e.g. if
REQUIRED_PYTHON is 3.8 and CURRENT_PYTHON is 3.7 it would request that
Django < 2 is installed, but there are later versions of Django that
support Python 3.7.

By the time Django 4 is released in December 2021, the python_requires
argument will have been supported for over five years, and Python 2 will
have been EOL for nearly two years, so we can remove this check.

See https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires
2021-04-15 08:12:35 +02:00
Florian Apolloner
4511d14598 Fixed #32643 -- Fixed decoding of messages in the pre-Django 3.2 format.
Thanks Jan Pieter Waagmeester for the report.

Regression in 2d6179c819.
2021-04-14 22:52:59 +02:00
Mariusz Felisiak
ca98729055
Fixed #32645 -- Fixed QuerySet.update() crash when ordered by joined fields on MySQL/MariaDB.
Thanks Matt Westcott for the report.

Regression in 779e615e36.
2021-04-14 21:11:17 +02:00
Mariusz Felisiak
338eb65b6e Refs #32548 -- Forwardported 3.2.1 release note. 2021-04-14 20:25:58 +02:00
Arthur Jovart
08c60cce3b Fixed #32648 -- Fixed VariableDoesNotExist rendering sitemaps template. 2021-04-14 16:50:47 +02:00
Mariusz Felisiak
23fa29f6a6
Fixed #32649 -- Fixed ModelAdmin.search_fields crash when searching against phrases with unbalanced quotes.
Thanks Dlis for the report.

Regression in 26a413507a.
2021-04-14 12:23:47 +02:00
Hasan Ramezani
a77c9a4229 Fixed #32635 -- Fixed system check crash for reverse o2o relations in CheckConstraint.check and UniqueConstraint.condition.
Regression in b7b7df5fbc.

Thanks Szymon Zmilczak for the report.
2021-04-14 10:06:18 +02:00
Hasan Ramezani
33abc55601 Refs #31530 -- Added test for joined OneToOneField in CheckConstraint.check 2021-04-14 09:37:55 +02:00
Daniel Hahler
59552bea57 Corrected typo in Field.deconstruct docstring. 2021-04-13 11:44:44 +02:00
Mariusz Felisiak
3b8527e32b
Fixed #32637 -- Restored exception message on technical 404 debug page.
Thanks Atul Varma for the report.
2021-04-13 09:15:04 +02:00
Adam Johnson
b8bb9e1549 Reduced the garbage collection frequency in runtests.py. 2021-04-13 07:43:29 +02:00
Iuri de Silvio
9760e262f8 Fixed #32627 -- Fixed QuerySet.values()/values_list() crash on combined querysets ordered by unannotated columns. 2021-04-12 21:11:40 +02:00
Chris Jerdonek
823a9e6bac Fixed #32416 -- Made ThreadedWSGIServer close connections after each thread.
ThreadedWSGIServer is used by LiveServerTestCase.
2021-04-12 10:23:56 +02:00
Chris Jerdonek
71a936f9d8 Refs #32416 -- Added LiveServerTestCase._make_connections_override() hook. 2021-04-12 08:54:03 +02:00
Claude Paroz
e4430f22c8 Fixed #31937 -- Eased translation of time strings in some languages. 2021-04-10 20:23:12 +02:00
Hasan Ramezani
1351f2ee16
Fixed #32618 -- Added link to conditional aggregation in aggregation topic guide. 2021-04-09 21:34:44 +02:00
Mariusz Felisiak
b8c9e9fae1
Refs #32074 -- Removed usage of Python's deprecated distutils.version package.
The distutils package was formally deprecated in Python 3.10 and will
be removed in Python 3.12.
2021-04-09 12:56:27 +02:00
Hasan Ramezani
fc268c8648
Fixed #32535 -- Added note about DEBUG_PROPAGATE_EXCEPTIONS setting to middleware docs. 2021-04-09 10:47:46 +02:00