Commit Graph

10682 Commits

Author SHA1 Message Date
Hasan Ramezani 2633c5341e Fixed #22261 -- Fixed resolving namespaced URLs for flatpages. 2020-01-28 13:14:23 +01:00
Mariusz Felisiak e2fab0b679 Refs #22261 -- Added missing trailing slash to the flatpages_tests urls. 2020-01-28 13:01:08 +01:00
Hannes Ljungberg 7edd06a9cf Improved SearchVectorCombinable and SearchQueryCombinable error messages. 2020-01-27 15:09:47 +01:00
Claude Paroz 50cf183d21 Refs #27468 -- Added algorithm parameter to django.utils.crypto.salted_hmac(). 2020-01-27 12:42:21 +01:00
Mariusz Felisiak c00b863ac6 Made OnDeleteTests.test_protect() assert more specific ProtectedError. 2020-01-27 12:21:02 +01:00
Hasan Ramezani ab3cbd8b9a Refs #27852 -- Fixed object deletion to show all protected related objects rather than just the first one.
Thanks Anton Samarchyan for the initial patch.
2020-01-27 12:21:02 +01:00
Claude Paroz e348ab0d43 Fixed #30997 -- Deprecated HttpRequest.is_ajax(). 2020-01-27 08:54:32 +01:00
Claude Paroz 7fa0fa45c5 Refs #30997 -- Removed HttpRequest.is_ajax() usage. 2020-01-27 08:52:40 +01:00
Claude Paroz d66d72f956 Refs #30997 -- Added HttpRequest.accepts(). 2020-01-24 14:24:59 +01:00
Hasan Ramezani b94764e178 Fixed #27888 -- Added link to clear all filters in the admin changelist view. 2020-01-23 14:14:54 +01:00
Michael Mulholland 5a68a223c7 Fixed #31200 -- Added system checks for permissions codenames max length. 2020-01-23 12:22:59 +01:00
Mariusz Felisiak b423873cb7
Refs #31197 -- Added tests for combined expressions in CheckConstraint.check.
Thanks Adam Johnson for the report.

Fixed in 306b687520.
2020-01-23 10:28:36 +01:00
Eugene Hatsko 0b013564ef Fixed #31190 -- Fixed prefetch_related() crash for GenericForeignKey with custom ContentType foreign key.
Regression in dffa3e1992.
2020-01-22 07:54:16 +01:00
Sergey Fedoseev 31e2ab345b Fixed #31195 -- Relaxed GeometryDistance test for PROJ 5.2+. 2020-01-21 22:16:23 +01:00
Sergey Fedoseev f2a725fba3 Fixed #30274 -- Prevented segmentation fault on LineString iteration.
This reverts commit 138a78ec8c and adds
a test for the regression.
2020-01-21 21:46:47 +01:00
Christopher G Johnson 33ec01caaf Refs #29095 -- Added test for using QuerySet.count() with window expressions ordered by related fields.
Fixed in 3f32154f40.
2020-01-21 10:43:21 +01:00
Tim Graham 227d0c7365 Fixed #31183 -- Added a feature flag for "<db> only supports UNBOUNDED together with PRECEDING and FOLLOWING". 2020-01-20 20:03:35 +01:00
Matthijs Kooijman 2a2ea4ee18 Refs #31117 -- Made various tests properly handle unexpected databases aliases.
- Used selected "databases" instead of django.db.connections.
- Made routers in tests.migrations skip migrations on unexpected
  databases.
- Added DiscoverRunnerGetDatabasesTests.assertSkippedDatabases() hook
  which properly asserts messages about skipped databases.
2020-01-20 14:39:02 +01:00
Matthijs Kooijman b64b1b2e1a Fixed #31117 -- Isolated backends.base.test_creation.TestDbCreationTests.
Previously, this test could modify global state by changing
connection.settings_dict. This dict is a reference to the same dict as
django.db.connections.databases['default'], which is thus also changed.
The cleanup of this test would replace connection.settings_dic` with a
saved copy, which would leave the dict itself modified.

Additionally, create_test_db() would also modify these same dicts, as
well as settings.databases['default']['NAME'] by adding a "test_"
prefix, which is what can cause problems later.

This patch:
 - makes a complete copy of the connection and work on that, to improve
   isolation.
 - calls destroy_test_db() to let that code clean up anything done by
   create_test_db().
2020-01-20 11:00:17 +01:00
Mariusz Felisiak f34be5294d Refs #31117 -- Moved get_connection_copy() test hook to a module level. 2020-01-20 11:00:05 +01:00
Sergey Fedoseev a920c0b852 Fixed #31142 -- Fixed MakeValid.output_field when geometry type is changed.
Regression in 2ef4b4795e.
2020-01-20 08:59:45 +01:00
Mariusz Felisiak 7d8df4ad03
Fixed field default in dates tests. 2020-01-18 20:07:25 +01:00
Pavel Lysak 13e4abf83e Fixed #30752 -- Allowed using ExceptionReporter subclasses in error reports. 2020-01-16 15:25:49 +01:00
Mariusz Felisiak 266c853e10
Fixed #31162 -- Prevented error logs when using WKT strings in lookups.
Thanks dbxnr for the initial patch.

Regression in 6f44f714c9.
2020-01-16 14:34:54 +01:00
Flavio Curella d08d4f464a Fixed #30765 -- Made cache_page decorator take precedence over max-age Cache-Control directive. 2020-01-16 13:39:16 +01:00
Mariusz Felisiak bf77669453
Fixed #29998 -- Allowed multiple OneToOneFields to the parent model.
We assumed that any OneToOneField's in a child model must be the
parent link and raised an error when parent_link=True was not
specified. This patch allows to specify multiple OneToOneField's to
the parent model.

OneToOneField's without a custom related_name will raise fields.E304
and fields.E305 so this should warn users when they try to override
the auto-created OneToOneField.
2020-01-16 08:06:16 +01:00
Carlton Gibson 29c126bb34 Fixed #31124 -- Fixed setting of get_FOO_display() when overriding inherited choices.
Regression in 2d38eb0ab9
2020-01-15 15:35:22 +01:00
Claude Paroz b5a62bd17d Refs #27468 -- Added explicit tests for django.utils.crypto.salted_hmac() 2020-01-15 12:53:21 +01:00
Mariusz Felisiak 59b4e99dd0
Refs #31136 -- Made QuerySet.values()/values_list() group only by selected annotation.
Regression in 0f843fdd5b.
2020-01-15 09:32:42 +01:00
chetan22 63e6ee1f99 Fixed #29871 -- Allowed setting pk=None on a child model to create a copy.
Thanks Simon Charette and Tim Graham for the initial patch.
2020-01-15 08:28:30 +01:00
Mariusz Felisiak 6f7998adc7
Fixed #31155 -- Fixed a system check for the longest choice when a named group contains only non-string values.
Regression in b6251956b6.

Thanks Murat Guchetl for the report.
2020-01-11 19:47:36 +01:00
Adam Donaghy 8b3e714ecf Fixed #30980 -- Improved error message when checking uniqueness of admin actions' __name__.
Thanks Keshav Kumar for the initial patch.
2020-01-10 14:00:28 +01:00
Carlton Gibson e2d9d66a22 Fixed #23004 -- Added request.META filtering to SafeExceptionReporterFilter.
Co-authored-by: Ryan Castner <castner.rr@gmail.com>
2020-01-10 11:35:41 +01:00
Carlton Gibson 581ba5a948 Refs #23004 -- Allowed exception reporter filters to customize settings filtering.
Thanks to Tim Graham for the original implementation idea.

Co-authored-by: Daniel Maxson <dmaxson@ccpgames.com>
2020-01-10 11:21:23 +01:00
Adam Johnson 5166097d7c Fixed #31154 -- Added support for using enumeration types in templates.
Enumeration helpers are callables, so the template system tried to call
them with no arguments.

Thanks Rupert Baker for helping discover this.
2020-01-10 07:52:06 +01:00
Carlton Gibson 4c1b401e82 Added file cleanup in FileFieldTests.test_pickle(). 2020-01-09 20:47:45 +01:00
Jack Cushman eb629f4c02 Fixed #30995 -- Allowed converter.to_url() to raise ValueError to indicate no match. 2020-01-09 14:41:41 +01:00
Hasan Ramezani eef3ea847e Fixed #31148 -- Added error messages on update()/delete() operations following union(), intersection(), and difference(). 2020-01-09 12:20:54 +01:00
Hasan Ramezani f600e3fad6 Fixed #21238 -- Fixed restoring attributes when pickling FileField and ImageField. 2020-01-09 09:37:59 +01:00
Hasan Ramezani aaea9deac4 Refs #21238 -- Added more tests for pickling FileField and ImageField. 2020-01-09 09:18:53 +01:00
Hasan Ramezani 66e16dcc99 Removed unused lines in ImageFieldTests.test_pickle(). 2020-01-09 08:44:39 +01:00
Jack Cushman 07f6ff09e4 Added tests for using the same name for multiple URL patterns. 2020-01-08 10:55:53 +01:00
Shubham singh ffcf1a8ebf Fixed #31118 -- Made FileInput to avoid the required attribute when initial data exists. 2020-01-08 09:15:31 +01:00
Mariusz Felisiak 53d8646f79
Fixed #31141 -- Relaxed system check of translation settings for sublanguages.
Regression in 4400d8296d.

Thanks Enrique Matías Sánchez for the report.
2020-01-08 08:05:43 +01:00
Mariusz Felisiak 8be477be5c
Fixed timezones tests for PyYAML 5.3+. 2020-01-07 09:54:22 +01:00
Adam Johnson 2ea3fb3e63 Removed "Don't do that" from docs and error messages.
It's slightly aggressive and doesn't explain itself.
2020-01-06 13:50:43 +01:00
Claude Paroz 1487f16f2d Fixed #11385 -- Made forms.DateTimeField accept ISO 8601 date inputs.
Thanks José Padilla for the initial patch, and Carlton Gibson for the
review.
2020-01-06 10:52:09 +01:00
Mariusz Felisiak 0f843fdd5b
Fixed #31136 -- Disabled grouping by aliases on QuerySet.values()/values_list().
Regression in fb3f034f1c.

Thanks Sigurd Ljødal for the report.
2020-01-04 20:49:11 +01:00
Claude Paroz 495d7a1ddf Reorganized forms.DateTimeField tests. 2020-01-03 10:36:58 +01:00
Simon Charette 9bcbcd599a Fixed #31133 -- Fixed crash when subtracting against a subquery annotation.
The subtract_temporals() database operation was not handling expressions
returning SQL params in mixed database types.

Regression in 3543129822.

Thanks Reupen Shah for the report.
2020-01-03 10:35:08 +01:00