Tim Graham
afcad0f1b1
Relaxed some query ordering assertions in expressions tests.
...
It accounts for differences seen on CockroachDB.
2020-10-19 19:21:31 +02:00
Hasan Ramezani
3b1746d519
Fixed #32107 -- Fixed ProtectedError.protected_objects and RestrictedError.restricted_objects.
...
Regression in 4ca5c565f4
and
ab3cbd8b9a
.
Thanks Vitaliy Yelnik for the report.
2020-10-19 12:43:32 +02:00
Tim Graham
0eee5c1b9c
Added DatabaseFeatures.can_alter_geometry_field.
2020-10-19 12:41:52 +02:00
Hannes Ljungberg
c7c7615d00
Fixed #32116 -- Fixed QuerySet.order_by() crash on EmptyQuerySet with union() on a single non-empty ordered queryset.
2020-10-19 08:36:07 +02:00
Tim Graham
78eeb24774
Made test_change_list_sorting_model_admin_reverse's assertions more specific.
...
The test could fail on databases like CockroachDB that use non-serial
primary keys if the numbers (2000, etc.) appeared in the pk values.
2020-10-18 19:48:06 +02:00
Claude Paroz
7f85498eef
Fixed #32110 -- Doc'd and tested enumerations for ChoiceField.choices.
2020-10-17 20:30:57 +02:00
manav014
af87574a3c
Fixed #6517 -- Made dbshell use charset option on MySQL.
...
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-10-17 12:24:36 +02:00
Nick Pope
177a49e79c
Reduced time.sleep() in cache touch() tests.
...
There are 8 cache backends to test and each test of touch() takes
~7s → ~56s. This seems excessive and it feels like we should be able
to reduce this significantly. time.sleep() accepts floating point
values and is guaranteed to sleep for at least the number of seconds
specified as of Python 3.5.
We do run the risk that there may be spurious test failures from this,
but that already seemed to be the case anyway.
2020-10-16 13:13:15 +02:00
Nick Pope
be183fc94f
Optimized inspectdb tests by specifying database tables/views.
2020-10-16 12:59:09 +02:00
Çağıl Uluşahin
9159d173c3
Fixed #25253 -- Made AlterField operation a noop when changing attributes that don't affect the schema.
2020-10-15 20:11:07 +02:00
Aarni Koskela
68e33b347d
Fixed #32105 -- Added template paths as ExceptionReporter class attributes.
...
This allows replacement of the debugging templates without having to
copy-paste the `get_traceback_html` and `get_traceback_text` functions
into a subclass.
Thanks to Nick Pope for review.
2020-10-15 13:56:15 +02:00
Mariusz Felisiak
6e4f7ec854
Refs #31926 -- Made test_pickle_filteredrelation_m2m do not depend on auto-PK.
...
This caused failures on CockroachDB that use random rather than serial
pk values.
2020-10-15 08:17:42 +02:00
Mariusz Felisiak
ee0abac169
Refs #32096 -- Fixed ExclusionConstraint crash with JSONField key transforms in expressions.
...
Regression in 6789ded0a6
.
2020-10-14 20:56:04 +02:00
Mariusz Felisiak
bbd55e5863
Refs #32096 -- Fixed ExpressionWrapper crash with JSONField key transforms.
...
Regression in 6789ded0a6
.
Thanks Simon Charette and Igor Jerosimić for the report.
2020-10-14 20:56:04 +02:00
Mariusz Felisiak
7e1e198494
Refs #32096 -- Fixed __in lookup crash against key transforms for JSONField.
...
Regression in 6789ded0a6
and
1251772cb8
.
Thanks Simon Charette and Igor Jerosimić for the report.
2020-10-14 20:56:04 +02:00
Mariusz Felisiak
1f31027bb3
Refs #32096 -- Fixed crash of ArrayAgg/StringAgg/JSONBAgg with ordering over JSONField key transforms.
...
Regression in 6789ded0a6
.
Thanks Igor Jerosimić for the report.
2020-10-14 20:56:04 +02:00
Mariusz Felisiak
1d650ad019
Refs #32096 -- Added test for ArrayAgg over JSONField key transforms.
2020-10-14 20:56:04 +02:00
Mariusz Felisiak
7bfdd3b951
Refs #32096 -- Added test for window expressions with JSONField key transforms.
2020-10-14 20:56:04 +02:00
David-Wobrock
ee005328c8
Fixed #31640 -- Made Trunc() truncate datetimes to Date/TimeField in a specific timezone.
2020-10-14 20:06:26 +02:00
David-Wobrock
8d018231ac
Removed redundant tests in test_extract_trunc.
...
tzinfo is ignored for DateFields and TimeFields, and it's already
covered by DateFunctionTests.test_trunc_func().
2020-10-14 20:03:44 +02:00
David-Wobrock
a0571c1003
Refs #31640 -- Made Extract raise ValueError when using tzinfo with Date/TimeField.
2020-10-14 20:03:07 +02:00
Jacob Walls
ac6c426007
Fixed #20601 -- Allowed forcing format with thousand separators in floatformat filter.
...
Thanks Claude Paroz and Nick Pope for reviews.
2020-10-13 10:36:46 +02:00
Octavio
746bb13ceb
Fixed #22490 -- Added tests for Feed.get_object().
2020-10-13 07:16:07 +02:00
Hasan Ramezani
78ae8cc5d8
Fixed #31674 -- Fixed displaying traceback in technical 500 debug page.
...
Previously, the technical 500 debug page didn't contain a traceback
when the exception chain contained an exception without traceback.
Thanks Chris Jerdonek for the report.
2020-10-12 10:25:36 +02:00
nik258heda
079deba530
Fixed #32087 -- Made technical 500 debug page use HTTPS for sharing traceback.
2020-10-12 06:29:36 +02:00
Thomas Riccardi
f1f24539d8
Fixed #32094 -- Fixed flush() calls on management command self.stdout/err proxies.
2020-10-09 12:59:00 +02:00
Tim Schilling
b7da588e88
Fixed #32091 -- Fixed admin search bar width on filtered admin page.
2020-10-09 11:39:22 +02:00
Qi Zhao
de81676b51
Fixed #32080 -- Fixed displaying Unicode chars in forms.JSONField and read-only JSONField values in admin.
2020-10-09 08:14:17 +02:00
Julien Rebetez
b790883065
Fixed #31181 -- Added links to related models for admin's readonly fields.
2020-10-08 19:53:49 +02:00
Tom Carrick
dcb69043d0
Fixed #32002 -- Added headers parameter to HttpResponse and subclasses.
2020-10-07 09:19:57 +02:00
Tom Carrick
2e7cc95499
Refs #32002 -- Added tests for HttpResponse's content_type parameter.
2020-10-07 09:19:57 +02:00
Max Smolens
07a30f5616
Fixed #31850 -- Fixed BasicExtractorTests.test_extraction_warning with xgettext 0.21+.
...
"format string with unnamed arguments cannot be properly localized"
warning is not raised in xgettext 0.21+.
This patch uses a message that causes an xgettext warning regardless of
the version.
2020-10-07 06:40:42 +02:00
Bob Renwick
036f160733
Refs #20577 -- Deferred filtering of prefetched related querysets by reverse m2o relation.
2020-10-06 21:19:56 +02:00
Mariusz Felisiak
999cddd58d
Fixed #32073 -- Skipped collation tests on PostgreSQL < 10.
...
PostgreSQL < 10 doesn't support ICU collations.
Thanks Hannes Ljungberg for the report.
2020-10-06 12:51:35 +02:00
Mariusz Felisiak
fce389af7c
Skipped GetImageDimensionsTests.test_webp when WEBP is not installed.
2020-10-06 11:25:04 +02:00
Hasan Ramezani
efe74fff25
Refs #32047 -- Added test for using call_command() with constant required options.
2020-10-06 08:23:25 +02:00
Simon Charette
0ef04fdd7a
Refs #31926 -- Fixed reverse related identity crash on Q() limit_choices_to.
2020-10-05 20:47:51 +02:00
Simon Charette
4c675523bd
Refs #29838 , Refs #28507 -- Made make_hashable() ignore key order.
2020-10-05 20:42:46 +02:00
Hasan Ramezani
981a3426cf
Fixed #32068 -- Added error messages on get() with filters following union(), intersection(), and difference().
2020-10-05 12:25:05 +02:00
Hasan Ramezani
7cfa40d872
Refs #32068 -- Added tests for get() following union(), intersection(), and difference().
2020-10-05 12:25:02 +02:00
David-Wobrock
c32d8f33d8
Fixed #31926 -- Fixed recreating queryset with FilteredRelation when using a pickled Query.
...
In a pickled join, the join_fields had the same values, but weren't the
same object (contrary to when not pickling the QuerySet).
2020-10-05 10:07:34 +02:00
Nick Pope
06c5d3fafc
Fixed #32060 -- Added Random database function.
2020-10-02 06:58:03 +02:00
Thibaud Colas
d6d007819d
Fixed typo in tests/view_tests/tests/test_debug.py docstring.
2020-10-01 13:08:25 +02:00
Hasan Ramezani
6eb3f53bdd
Fixed #32047 -- Fixed call_command() crash if a constant option from required mutually exclusive group is passed in options.
2020-09-30 20:10:38 +02:00
aryan
11c4a4412b
Fixed #30422 -- Made TemporaryFileUploadHandler handle interrupted uploads.
...
This patch allows upload handlers to handle interrupted uploads.
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-09-30 10:30:43 +02:00
aryan
21b127bfbc
Refs #30422 -- Added test for removing temporary files in MultiPartParser when StopUpload is raised.
2020-09-30 10:29:08 +02:00
David Wobrock
058747b77a
Fixed #31880 -- Made QuerySet.aggregate() raise FieldError when aggregating over aggregation aliases.
2020-09-29 09:04:25 +02:00
Jacob Walls
01a7af09b9
Fixed #18995 -- Made blocktranslate tag raise TemplateSyntaxError when plural count is not a number.
2020-09-29 08:03:51 +02:00
meghanabhange
848770dd2c
Fixed #32042 -- Improved error messages for the number of submitted forms in formsets.
2020-09-28 07:05:34 +02:00
David Smith
b8239cae19
Refs #28009 -- Added empty_value tests for CharField subclasses.
2020-09-25 12:33:54 +02:00
David Smith
997f87c5b0
Added assertions for cleaning None values for forms.JSONField and forms.UUIDField.
2020-09-25 10:12:01 +02:00
David Smith
4b032142fa
Used assertRaisesMessage() in CharField tests.
2020-09-25 10:12:01 +02:00
Mariusz Felisiak
e4ab44a4b2
Fixed #32038 -- Fixed EmptyFieldListFilter crash with GenericRelation.
...
Thanks Javier Matos Odut for the report.
2020-09-25 10:09:28 +02:00
David Smith
599f2f79e2
Fixed #30563 -- Optimized form Media by removing duplicated assets when adding.
2020-09-24 13:53:06 +02:00
David Smith
1ac337cca6
Refs #30563 -- Added tests for merging form Media with different ordering.
2020-09-24 13:53:02 +02:00
Jacob Walls
e26a7a8ef4
Fixed #27906 -- Fixed test tools counting of HTML matches for subsets of elements.
...
Previously examples such as '<a/><b/>' would not match in '<a/><b/><c/>'.
2020-09-24 12:52:41 +02:00
Mariusz Felisiak
77caeaea88
Fixed #32012 -- Made test database creation sync apps models when migrations are disabled.
...
Thanks Jaap Roes for the report.
2020-09-23 10:54:04 +02:00
Raffaele Salmaso
666f2e8acd
Refs #32034 -- Added test for title on admin app index view.
2020-09-23 10:01:03 +02:00
Hasan Ramezani
71d10ca8c9
Fixed #31723 -- Fixed window functions crash with DecimalField on SQLite.
...
Thanks Simon Charette for the initial patch.
2020-09-23 09:35:32 +02:00
Mariusz Felisiak
75d7af43c1
Corrected docstring quotes in various code.
2020-09-22 10:30:53 +02:00
Mariusz Felisiak
f7806193e6
Made indexes tests use required_db_features.
2020-09-22 10:29:59 +02:00
Tom Carrick
e387f191f7
Fixed #31777 -- Added support for database collations to Char/TextFields.
...
Thanks Simon Charette and Mariusz Felisiak for reviews.
2020-09-21 18:24:56 +02:00
Tom Carrick
278b6187d2
Refs #21181 -- Corrected DatabaseFeatures.test_collations for Swedish collation.
...
Previously, backends used different keys "swedish-ci" or "swedish_ci".
2020-09-18 12:15:46 +02:00
Hasan Ramezani
a046bcadbe
Fixed #31916 -- Fixed combined queryset crash when combining with ordered combined querysets.
2020-09-17 08:26:06 +02:00
Kwist
981a072dd4
Fixed #31843 -- Fixed pickling named values from QuerySet.values_list().
2020-09-16 13:43:06 +02:00
Mariusz Felisiak
3a9f192b13
Refs #32007 -- Skipped test_q_expression_annotation_with_aggregation on Oracle.
2020-09-16 11:47:02 +02:00
Nick Pope
b4d46df5ca
Fixed #29887 -- Added a cache backend for pymemcache.
2020-09-16 09:40:30 +02:00
Nick Pope
cda0a3d777
Refs #29887 , Refs #24212 -- Added more client servers tests for PyLibMCCache.
2020-09-16 07:38:32 +02:00
Mariusz Felisiak
eaf9764d3b
Fixed #32007 -- Fixed queryset crash with Q() annotation and aggregation.
...
Thanks Gordon Wrigley for the report.
Regression in 8a6df55f2d
.
2020-09-15 11:40:59 +02:00
Hasan Ramezani
7be6a6a4d6
Fixed #31989 -- Fixed return value of django.core.files.locks.lock()/unlock() on POSIX systems.
2020-09-15 10:21:26 +02:00
manav014
580a4341cb
Fixed #31636 -- Made BooleanFieldListFilter respect Field.choices.
2020-09-15 09:12:14 +02:00
Tim Graham
fed257ddff
Prevented creation of 3D test models if not supported.
...
There's no problem creating the models on MySQL and Oracle
(which don't support 3D storage) but CockroachDB currently
crashes with a syntax error.
2020-09-15 07:48:48 +02:00
Mariusz Felisiak
e11d05e0b4
Fixed #31990 -- Fixed QuerySet.ordered for GROUP BY queries on models with Meta.ordering.
...
Regression in 0ddb4ebf7b
.
Thanks Julien Dutriaux for the report.
2020-09-14 20:07:44 +02:00
Alexander Todorov
5fab16392f
Fixed #32003 -- Added obj argument to has_perm() methods in tests.
2020-09-14 12:28:17 +02:00
Tom Carrick
bcc2befd0e
Fixed #31789 -- Added a new headers interface to HttpResponse.
2020-09-14 08:41:59 +02:00
Tim Graham
71ae1ab012
Removed hardcoded paths to SpatialRefSys models in tests.
2020-09-14 07:58:05 +02:00
Tim Graham
a7a4ff1026
Refs #26697 -- Removed empty gis_tests.maps.
2020-09-14 07:48:47 +02:00
Mariusz Felisiak
3b8857b51a
Corrected tests.backends.sqlite.tests.Tests.test_aggregation()'s docstring.
2020-09-13 20:09:44 +02:00
Barton Ip
12d6cae7c0
Fixed #31766 -- Made GDALRaster.transform() return a clone for the same SRID and driver.
...
Thanks Daniel Wiesmann for the review.
2020-09-11 10:31:38 +02:00
Hasan Ramezani
5362e08624
Fixed #31943 -- Fixed recreating QuerySet.values()/values_list() when using a pickled Query.
2020-09-11 07:58:52 +02:00
Jon Dufresne
84609b3205
Fixed #31993 -- Added subtitles to admin change/view pages.
2020-09-11 06:28:45 +02:00
Jon Dufresne
cbe34dc8ec
Refs #31993 -- Added more titles assertions for admin views.
2020-09-10 13:21:08 +02:00
Jon Dufresne
53c0d16ac1
Fixed #31992 -- Made admin password reset templates use title/content_title blocks from the base template.
2020-09-10 11:53:09 +02:00
Jacob Walls
1db8d8e3a9
Refs #23130 -- Added test for BooleanField choices generation.
2020-09-10 11:42:06 +02:00
Ryan Hiebert
502e75f9ed
Fixed #31750 -- Made models.Field equality compare models for inherited fields.
2020-09-09 20:52:59 +02:00
Hasan Ramezani
2808cdc8fb
Fixed #31962 -- Made SessionMiddleware raise SessionInterrupted when session destroyed while request is processing.
2020-09-09 09:04:28 +02:00
Petr Čermák
fc1446073e
Fixed #31987 -- Fixed Cast() with DurationField on MySQL.
2020-09-09 07:01:18 +02:00
François Freitag
57dadfac3c
Fixed #31944 -- Used addCleanup() to register TestContextDecorator cleanups.
...
Cleanups from addCleanup() are scheduled to happen in reverse order to
the order they are added (LIFO). Ensures each cleanup is executed from
the innermost to the outermost.
2020-09-07 08:07:26 +02:00
Jon Dufresne
11ebc6479f
Fixed #31791 -- Made technical 404 debug page display the tried URL patterns for Http404.
2020-09-07 06:54:19 +02:00
Hasan Ramezani
d2d08c8cf6
Fixed #31982 -- Made HttpResponse.set_cookie() cast max_age argument to an integer.
2020-09-05 10:07:23 +02:00
Mariusz Felisiak
e6b5108acc
Fixed #27417 -- Made RenameField operation a noop for field name case changes on Oracle.
...
Field names are always uppercased in the Oracle backend. Changing case
should be a noop to avoid database errors: "ORA-00957: duplicate column
name".
2020-09-04 20:27:23 +02:00
jpribyl
94e2238107
Refs #31894 -- Added tests for JSONField key lookups with QuerySet.exclude().
2020-09-04 09:04:24 +02:00
Nick Pope
fd209f62f1
Refs #21231 -- Backport urllib.parse.parse_qsl() from Python 3.8.
2020-09-03 14:24:42 +02:00
Collin Anderson
daa26acc4e
Fixed #31978 -- Added username hint to admin's password reset confirmation form.
2020-09-03 09:25:21 +02:00
Mariusz Felisiak
6a881197e9
Refs #31901 -- Fixed SeleniumTests.test_list_editable_popups with headless mode.
2020-09-02 15:16:03 +02:00
Brian Helba
2d42e23b6d
Fixed #31941 -- Corrected FileField.deconstruct() with a callable storage.
2020-09-02 11:06:18 +02:00
Tim Park
ece18207cb
Fixed #31858 -- Reallowed whitespaces in URL paths outside of parameters.
...
Regression in 22394bd3a1
.
Thanks David Smith for the review.
2020-09-02 10:24:14 +02:00
Nick Pope
a629139425
Refs #29887 , Refs #24212 -- Added servers configuration hook for memcached backends.
...
The servers property can be overridden to allow memcached backends to
alter the server configuration prior to it being passed to instantiate
the client. This allows avoidance of documentation for per-backend
differences, e.g. stripping the 'unix:' prefix for pylibmc.
2020-09-02 08:51:17 +02:00
Joe Jackson
9d5d865fd6
Fixed #31948 -- Added tzinfo parameter to TruncDate() and TruncTime().
2020-09-02 07:42:27 +02:00
Nick Pope
cc1f2c6a19
Refs #29887 -- Simplified memcached client instantiation.
2020-09-01 10:51:00 +02:00
Mariusz Felisiak
1853724aca
Fixed CVE-2020-24584 -- Fixed permission escalation in intermediate-level directories of the file system cache on Python 3.7+.
2020-09-01 09:17:23 +02:00
Mariusz Felisiak
8d7271578d
Fixed CVE-2020-24583, #31921 -- Fixed permissions on intermediate-level static and storage directories on Python 3.7+.
...
Thanks WhiteSage for the report.
2020-09-01 09:17:23 +02:00
Federico Jaramillo Martínez
179d9dc0c2
Fixed #31952 -- Fixed EmptyFieldListFilter crash with reverse relationships.
...
Thanks dacotagh for the report.
2020-08-31 09:28:05 +02:00
Simon Charette
f6405c0b8e
Fixed #31965 -- Adjusted multi-table fast-deletion on MySQL/MariaDB.
...
The optimization introduced in 7acef095d7
did not properly handle
deletion involving filters against aggregate annotations.
It initially was surfaced by a MariaDB test failure but misattributed
to an undocumented change in behavior that resulted in the systemic
generation of poorly performing database queries in 5b83bae031
.
Thanks Anton Plotkin for the report.
Refs #23576 .
2020-08-31 08:11:28 +02:00
Simon Charette
38fce49c82
Fixed #31919 -- Resolved output_field of IntegerField subclasses combinations.
2020-08-31 06:42:40 +02:00
Simon Charette
40894f2967
Refs #30446 -- Added tests for resolving output_field of CombinedExpression.
2020-08-31 06:40:39 +02:00
Mariusz Felisiak
0be51d2226
Fixed #31956 -- Fixed crash of ordering by JSONField with a custom decoder on PostgreSQL.
...
Thanks Marc Debureaux for the report.
Thanks Simon Charette, Nick Pope, and Adam Johnson for reviews.
2020-08-28 19:09:46 +02:00
Mariusz Felisiak
2210539142
Refs #31956 -- Added test for ordering by JSONField with a custom decoder.
2020-08-28 19:09:41 +02:00
Koen De Wit
4c0b4720b0
Fixed #31954 -- Fixed migration optimization for MTI model creation with parent model with mixed case app label.
2020-08-28 13:35:13 +02:00
Kevin Michel
225261b701
Refs #31928 -- Added various middlewares tests for detecting when get_response is coroutine.
2020-08-28 12:33:29 +02:00
Kevin Michel
825ce75fae
Fixed #31928 -- Fixed detecting an async get_response in various middlewares.
...
SecurityMiddleware and the three cache middlewares were not calling
super().__init__() during their initialization or calling the required
MiddlewareMixin._async_check() method.
This made the middlewares not properly present as coroutine and
confused the middleware chain when used in a fully async context.
Thanks Kordian Kowalski for the report.
2020-08-28 12:33:15 +02:00
Kevin Michel
68d7cf4054
Refs #26601 -- Added various middlewares tests for deprecation of passing None as get_response.
2020-08-28 12:33:15 +02:00
Kevin Michel
abbdd3a622
Added tests for cache middlewares constructors.
2020-08-28 10:00:39 +02:00
Mariusz Felisiak
1251772cb8
Fixed #31936 -- Fixed __in lookup on key transforms for JSONField.
...
This resolves an issue on databases without a native JSONField
(MariaDB, MySQL, SQLite, Oracle), where values must be wrapped.
Thanks Sébastien Pattyn for the report.
2020-08-26 22:13:37 +02:00
Jeremy Lainé
9c92924cd5
Fixed #31942 -- Made settings cleansing work with dictionary settings with non-string keys.
2020-08-26 11:59:37 +02:00
Kaustubh
b9be11d442
Fixed #31918 -- Allowed QuerySet.in_bulk() to fetch on a single distinct field.
2020-08-26 09:43:39 +02:00
Michael Galler
547a07fa7e
Fixed #31905 -- Made MiddlewareMixin call process_request()/process_response() with thread sensitive.
...
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2020-08-26 07:13:49 +02:00
Tim Graham
ea880ec233
Fixed #24533 -- Dropped PostgreSQL sequence and Oracle identity when migrating away from AutoField.
2020-08-24 14:32:07 +02:00
Nick Pope
b312421511
Refs #30897 -- Added test for WAL option to Queryset.explain() on PostgreSQL 13+.
2020-08-24 11:47:38 +02:00
Mariusz Felisiak
bb8f66934d
Fixed #31877 -- Reverted "Fixed #19878 -- Deprecated TemplateView passing URL kwargs into context."
...
This reverts commit 4ed534758c
.
2020-08-24 11:37:59 +02:00
Mariusz Felisiak
04e87e79a0
Refs #31877 -- Reverted "Fixes #31877 -- Used lazy() for TemplateView kwarg deprecation warning."
...
This reverts commit 20799cc0a6
.
2020-08-24 11:37:59 +02:00
Nick Pope
b5acb9db75
Fixed #31907 -- Fixed missing validate_key() calls in cache backends.
2020-08-24 09:41:21 +02:00
Nick Pope
9e04b242ee
Refs #31907 -- Added cache key validation tests for cache operations.
2020-08-24 09:33:55 +02:00
Tim Graham
7ca42974ee
Added assertions for the results of migrating an integer pk to AutoField.
2020-08-24 06:45:48 +02:00
Mariusz Felisiak
4376c2c7f8
Fixed #31895 -- Fixed crash when decoding invalid session data.
...
Thanks Matt Hegarty for the report.
Regression in d4fff711d4
.
2020-08-19 12:06:00 +02:00
Maxim Petrov
bf6d07730c
Fixed #31902 -- Fixed crash of ExclusionConstraint on expressions with params.
2020-08-19 06:43:54 +02:00
Mariusz Felisiak
35b03788b0
Refs #9061 -- Allowed GenericInlineFormSet to disable deleting extra forms.
...
Follow up to 162765d6c3
.
2020-08-18 09:37:15 +02:00
Mariusz Felisiak
3254991762
Refs #20347 -- Allowed customizing the maximum number of instantiated forms in generic_inlineformset_factory().
...
Follow up to 433dd737f9
.
2020-08-18 09:37:15 +02:00
Ahmad A. Hussein
493b26bbfc
Fixed #31888 -- Avoided module-level MySQL queries in tests.
2020-08-17 09:31:16 +02:00
Iuri de Silvio
632ccffc49
Fixed #31826 -- Made AlterField operation a noop when adding db_column.
...
AlterField operation with adding a db_column is a noop if the column
name is not changed.
2020-08-14 13:13:36 +02:00
Yan Mitrofanov
b88f98738f
Fixed #31878 -- Made createsuperuser respect --database option in default usernames.
2020-08-14 11:08:20 +02:00
Yan Mitrofanov
552bb82928
Fixed typo in tests/auth_tests/test_management.py docstring.
2020-08-14 11:08:12 +02:00
Ahmad A. Hussein
61a0ba43cf
Refs #31811 -- Added optional timing outputs to the test runner.
2020-08-13 17:17:15 +02:00
Simon Charette
51297a9232
Fixed #31792 -- Made Exists() reuse QuerySet.exists() optimizations.
...
The latter is already optimized to limit the number of results, avoid
selecting unnecessary fields, and drop ordering if possible without
altering the semantic of the query.
2020-08-13 14:10:36 +02:00
Iuri de Silvio
7f4c9222df
Fixed #31825 -- Made RenameField operation a noop for fields with db_column.
2020-08-13 13:14:58 +02:00
Adam Johnson
20799cc0a6
Fixes #31877 -- Used lazy() for TemplateView kwarg deprecation warning.
...
SimpleLazyObjects cause a crash when filtering.
Thanks Tim L. White for the report.
Regression in 4ed534758c
.
2020-08-13 07:26:10 +02:00
Pat Garcia
8954f255bb
Fixed #31382 -- Made Model.save(update_fields=...) raise ValueError on non-concrete fields.
2020-08-12 21:13:55 +02:00
Gert Burger
94ea79be13
Fixed #31863 -- Prevented mutating model state by copies of model instances.
...
Regression in bfb746f983
.
2020-08-12 12:43:42 +02:00
Tom Carrick
63300f7e68
Fixed #21181 -- Added Collate database function.
...
Thanks Simon Charette for reviews.
2020-08-11 22:21:08 +02:00
Daniel Hillier
60626162f7
Fixed #31866 -- Fixed locking proxy models in QuerySet.select_for_update(of=()).
2020-08-11 11:55:10 +02:00
Carlton Gibson
0aeb802cf0
Fixed #31865 -- Adjusted admin nav sidebar template to reduce debug logging.
...
Thanks to Mariusz Felisiak for review.
2020-08-11 11:42:15 +02:00
Mariusz Felisiak
287e36bd22
Refs #31180 -- Fixed unreachable assertions in apps tests.
2020-08-11 10:31:09 +02:00
Iuri de Silvio
ebd78a9f97
Fixed #31870 -- Fixed crash when populating app registry with empty or without apps module.
...
Regression in 3f2821af6b
.
2020-08-10 20:16:45 +02:00
Iuri de Silvio
58a336a674
Fixed #31831 -- Fixed migration operations ordering when adding order_with_respect_to and constraints/indexes.
2020-08-08 20:43:45 +02:00
Iuri de Silvio
366a93f174
Refs #31831 -- Added autodector test for unique/index_together on _order field.
2020-08-08 20:43:40 +02:00
Mariusz Felisiak
99abfe8f4d
Fixed #31864 -- Fixed encoding session data during transition to Django 3.1.
...
Thanks אורי for the report.
2020-08-07 21:42:39 +02:00
Konstantin Alekseev
e5118b545b
Used mock.Mock() in SMTPBackendTests.
...
Using bool caused mypy typecheck failures.
2020-08-07 20:31:47 +02:00
Nick Pope
0a306f7da6
Fixed #25513 -- Extracted admin pagination to Paginator.get_elided_page_range().
2020-08-06 12:38:56 +02:00
Nick Pope
f35840c196
Refs #25513 -- Fixed admin pagination elision bounds.
...
It doesn't make sense to elide a single page number which could be a
clickable link to that page. We only want to elide two or more pages.
2020-08-06 12:38:56 +02:00
Nick Pope
b203ec70fd
Refs #25513 -- Adjusted admin pagination to be 1-indexed.
2020-08-06 12:38:56 +02:00
Jacob Walls
c7e7f176c1
Fixed #26977 -- Made abstract models raise TypeError when instantiating.
2020-08-05 06:37:04 +02:00
Mariusz Felisiak
d907371ef9
Fixed #31842 -- Added DEFAULT_HASHING_ALGORITHM transitional setting.
...
It's a transitional setting helpful in migrating multiple instance of
the same project to Django 3.1+.
Thanks Markus Holtermann for the report and review, Florian
Apolloner for the implementation idea and review, and Carlton Gibson
for the review.
2020-08-04 09:35:24 +02:00
Mariusz Felisiak
7c929fcf7c
Refs #27468 -- Fixed TestSigner.test_dumps_loads_legacy_signature.
...
Added in 1d6fdca557
.
2020-08-01 20:39:18 +02:00
Mariusz Felisiak
1d6fdca557
Refs #27468 -- Added tests and release notes for signing.dumps()/loads() changes.
...
Follow up to 71c4fb7beb
.
2020-07-31 22:05:02 +02:00
Alexandr Tatarinov
f4ac167119
Fixed #27719 -- Added QuerySet.alias() to allow creating reusable aliases.
...
QuerySet.alias() allows creating reusable aliases for expressions that
don't need to be selected but are used for filtering, ordering, or as
a part of complex expressions.
Thanks Simon Charette for reviews.
2020-07-31 13:19:33 +02:00
Mariusz Felisiak
88af11c58b
Refs #27996 -- Fixed postgres_tests crash if not running with PostgreSQL.
2020-07-31 12:38:09 +02:00
David Smith
e74b3d724e
Bumped minimum isort version to 5.1.0.
...
Fixed inner imports per isort 5.
isort 5.0.0 to 5.1.0 was unstable.
2020-07-30 10:58:59 +02:00
Viktor Garske
1173db4a16
Fixed #31822 -- Added support for comments URL per feed item.
...
The item_comments hook returns a comments URL which is then used by the
feed builder.
2020-07-30 07:36:27 +02:00
Tim Graham
184a6eebb0
Refs #31829 -- Added DatabaseFeatures.json_key_contains_list_matching_requires_list.
...
CockroachDB's behavior matches PostgreSQL.
2020-07-30 06:38:02 +02:00
David Smith
95da207bdb
Fixed #28507 -- Made ValidationError.__eq__() ignore messages and params ordering.
...
Co-authored-by: caleb logan <clogan202@gmail.com>
2020-07-29 12:04:13 +02:00
Florian Demmer
16218c2060
Fixed #27395 -- Added sitemap 'alternates' generation.
...
Updated the sitemap generator and default template to optionally
include link elements with hreflang attribute to alternate language
URLs.
2020-07-29 11:48:29 +02:00
Carlton Gibson
50e1ccbbea
Refs #27395 -- Added XML namespace declaration to sitemap template.
...
As per Google recommendations:
https://support.google.com/webmasters/answer/189077?hl=en
2020-07-29 11:48:29 +02:00
Florian Apolloner
948a874425
Fixed #29324 -- Made SECRET_KEY validation lazy (on first access).
2020-07-29 09:06:54 +02:00
Hasan Ramezani
9c9a3fe118
Fixed #31783 -- Fixed crash when filtering againts "negate" field.
...
Thanks Simon Charette for the initial patch.
2020-07-29 08:20:58 +02:00
David Smith
b6dfdaff33
Completed test coverage for colorize().
2020-07-29 07:57:06 +02:00
sage
2d8dcba03a
Fixed #31829 -- Used JSONField __contains lookup on key transforms.
2020-07-28 13:10:12 +02:00
Mariusz Felisiak
ba691933ce
Fixed #31836 -- Dropped support for JSONField __contains and __contained_by lookups on SQLite.
...
The current implementation works only for basic examples without
supporting nested structures and doesn't follow "the general principle
that the contained object must match the containing object as to
structure and data contents, possibly after discarding some
non-matching array elements or object key/value pairs from the
containing object".
2020-07-28 13:06:52 +02:00
Mariusz Felisiak
02447fb133
Fixed #31835 -- Dropped support for JSONField __contains lookup on Oracle.
...
The current implementation works only for basic examples without
supporting nested structures and doesn't follow "the general principle
that the contained object must match the containing object as to
structure and data contents, possibly after discarding some
non-matching array elements or object key/value pairs from the
containing object".
2020-07-28 11:54:01 +02:00
Nick Pope
628c4a26ee
Refs #27996 -- Doc'd no extension required for RandomUUID() on PostgreSQL 13+.
...
https://www.postgresql.org/docs/13/functions-uuid.html
https://www.postgresql.org/docs/13/pgcrypto.html#id-1.11.7.34.10.5
2020-07-28 07:21:16 +02:00
Jon Dufresne
83fbaa9231
Fixed #31806 -- Made validators include the value in ValidationErrors.
2020-07-27 13:03:26 +02:00
Jon Dufresne
013e06bb37
Refs #31806 -- Added tests for including the value in some ValidationErrors.
2020-07-27 13:03:19 +02:00
Mariusz Felisiak
f4e93919e4
Fixed #31815 -- Fixed schema value encoding on PostgreSQL.
2020-07-27 06:39:02 +02:00
Matthias Kestenholz
c1f8d87bb0
Fixed #31812 -- Fixed FileField.model for fields defined in abstract models.
...
Regression in a93425a37f
.
2020-07-24 11:06:57 +02:00
Parth Verma
41065cfed5
Fixed #31802 -- Added system check for non-integer SITE_ID.
2020-07-24 10:41:55 +02:00
Mariusz Felisiak
fd53db842c
Fixed #31805 -- Fixed SchemaTests.tearDown() when table names are case-insensitive.
2020-07-22 12:49:56 +02:00
Mariusz Felisiak
c071c408d7
Fixed #31797 -- Skipped schema tests on specific MariaDB versions.
...
test_alter_not_unique_field_to_primary_key() test is affected by
https://jira.mariadb.org/browse/MDEV-19598 on MariaDB 10.4.4 to 10.5.1.
test_alter_pk_with_self_referential_field() test is affected by
https://jira.mariadb.org/browse/MDEV-22775 on MariaDB 10.4 series
from 10.4.13.
2020-07-22 10:57:38 +02:00
Tim Graham
ff55adbd0d
Reverted "Fixed #30300 -- Allowed migrations to be loaded from directories without __init__.py file."
...
This reverts commit 3cd3bebe89
.
2020-07-22 07:04:06 +02:00
Aymeric Augustin
3f2821af6b
Fixed #31180 -- Configured applications automatically.
2020-07-21 10:35:12 +02:00
David Chorpash
6ec5eb5d74
Refs #31720 -- Defined default output_field of BoolAnd() and BoolOr() aggregate functions.
2020-07-21 06:42:51 +02:00
Jon Dufresne
796be5901a
Fixed #31769 -- Improved default naming of merged migrations.
...
47 gives 60 in total (47 + 5 + 5 + 3).
2020-07-20 15:04:22 +02:00
Jon Dufresne
e1e4fd707f
Used context manager version of tempfile.TemporaryDirectory() in utils_tests.test_autoreload.
2020-07-20 11:08:23 +02:00
Mariusz Felisiak
83f55aafdd
Fixed #17653 -- Allowed using zero as AutoFields value on MySQL if NO_AUTO_VALUE_ON_ZERO SQL mode is enabled.
2020-07-20 09:48:31 +02:00
Tom Forbes
730711e828
Used temporary directory in RestartWithReloaderTests.test_manage_py().
...
Using the current directory can cause a PermissionError.
2020-07-20 09:16:16 +02:00
Florian Apolloner
96a3ea39ef
Fixed #31784 -- Fixed crash when sending emails on Python 3.6.11+, 3.7.8+, and 3.8.4+.
...
Fixed sending emails crash on email addresses with display names longer
then 75 chars on Python 3.6.11+, 3.7.8+, and 3.8.4+.
Wrapped display names were passed to email.headerregistry.Address()
what caused raising an exception because address parts cannot contain
CR or LF.
See https://bugs.python.org/issue39073
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-07-20 07:10:40 +02:00
Mariusz Felisiak
f405954ea2
Refs #31784 -- Added test for preventing header injection in display name of email addresses.
2020-07-20 07:10:16 +02:00
Mariusz Felisiak
3d16496037
Bumped asgiref requirement to >= 3.2.10.
...
Forwardported 3.1 release notes from 474f65406f
.
2020-07-17 21:15:21 +02:00
Claudio Catterina
faa6d41cda
Fixed typo in DecimalValidator tests.
...
This replaces redundant test for -Infinity with +Infinity.
2020-07-16 11:21:39 +02:00
Tim Park
8fa9a6d29e
Fixed #31623 -- Allowed specifying number of adjacent time units in timesince()/timeuntil().
2020-07-16 09:44:28 +02:00
Mariusz Felisiak
240cbb63bf
Fixed #31790 -- Fixed setting SameSite and Secure cookies flags in HttpResponse.delete_cookie().
...
Cookies with the "SameSite" flag set to None and without the "secure"
flag will be soon rejected by latest browser versions.
This affects sessions and messages cookies.
2020-07-16 08:16:58 +02:00
Simon Charette
156a2138db
Refs #30446 -- Removed unnecessary Value(..., output_field) in docs and tests.
2020-07-15 10:58:38 +02:00
Simon Charette
1e38f1191d
Fixed #30446 -- Resolved Value.output_field for stdlib types.
...
This required implementing a limited form of dynamic dispatch to combine
expressions with numerical output. Refs #26355 should eventually provide
a better interface for that.
2020-07-15 10:58:29 +02:00
Simon Charette
1b7623fdfd
Refs #30446 -- Defined output_field of BoundingCircle() GIS database function.
...
This prevented the default behavior of
BaseExpression._resolve_output_field from error'ing out when such
functions accepted both expressions from mixed types
(e.g. BoundingCircle(Polygon, num_seg=12)).
2020-07-14 09:36:17 +02:00
Simon Charette
9c5c9bd709
Stopped adapting DecimalField values to strings on PostgreSQL.
...
The psycopg2 backend uses the type information to provide type hints.
2020-07-14 07:40:10 +02:00
Simon Charette
f783a99072
Refs #25425 -- Allowed unresolved Value() instances to be compiled.
...
Previously unresolved Value() instances were only allowed to be
compiled if they weren't initialized with an output_field.
Given the usage of unresolved Value() instances is relatively common in
as_sql() overrides it's less controversial to add explicit support for
this previously undefined behavior now and revisit whether or not it
should be deprecated in the future.
2020-07-14 07:20:20 +02:00
Adam Johnson
e906ff6fca
Fixed #30457 -- Added TestCase.captureOnCommitCallbacks().
2020-07-13 11:56:46 +02:00
Tom Forbes
f36862b69c
Fixed #31674 -- Made technical 500 debug page respect __suppress_context__.
2020-07-13 08:06:21 +02:00
ovkulkarni
b7a438c7e2
Fixed #31509 -- Made DiscoverRunner enable faulthandler by default.
2020-07-10 18:55:50 +02:00
Claude Paroz
00727d384b
Refs #30578 -- Made SelectDateWidget.format_value() independent of USE_L10N.
2020-07-10 13:00:37 +02:00
François Freitag
04e4f80c1f
Sorted conflicting migrations by names.
2020-07-10 12:18:42 +02:00
matt ferrante
7d6916e827
Fixed #29789 -- Added support for nested relations to FilteredRelation.
2020-07-09 20:24:00 +02:00
Jon Dufresne
5a3d7cf462
Used urllib.parse.urljoin() in auth_tests to join URLs.
...
As the strings represent URLs and not paths, should use urllib to
manipulate them.
2020-07-09 12:03:03 +02:00
Mariusz Felisiak
8a6df55f2d
Fixed #31773 -- Fixed preserving output_field in ExpressionWrapper for combined expressions.
...
Thanks Thodoris Sotiropoulos for the report and Simon Charette for the
implementation idea.
Regression in df32fd42b8
.
2020-07-09 11:55:03 +02:00
Jon Dufresne
0e6fa65ffd
Refs #30400 -- Improved typography in debug and csrf templates.
2020-07-08 22:04:37 +02:00
davidchorpash
779e615e36
Fixed #31573 -- Made QuerySet.update() respect ordering on MariaDB/MySQL.
2020-07-08 11:43:50 +02:00
Mariusz Felisiak
ae8338daf3
Fixed #31767 -- Fixed QuerySet.none() on combined queryset.
2020-07-07 12:15:05 +02:00
rico-ci
cb0da637a6
Fixed #31713 -- Added SpatialReference support to GDALRaster.transform().
2020-07-07 09:26:44 +02:00
Hasan Ramezani
7af8f41273
Refs #26445 -- Allowed using UserManager.create_user()/create_superuser() in migrations.
...
Used app config to lookup user model in _create_user().
Thanks Markus Holtermann for the review and initial patch.
Thanks Simon Charette for the implementation idea.
2020-07-06 11:47:22 +02:00
Jacob Walls
512da9d585
Fixed #23797 -- Fixed QuerySet.exclude() when rhs is a nullable column.
2020-07-06 10:15:37 +02:00
Hasan Ramezani
b7b7df5fbc
Fixed #31530 -- Added system checks for invalid model field names in CheckConstraint.check and UniqueConstraint.condition.
2020-07-06 09:16:57 +02:00
Sergey Fedoseev
9d519d3dc4
Fixed #31755 -- Made temporal subtraction resolve output field.
2020-07-01 23:02:27 +02:00
Sergey Fedoseev
ed6b14d459
Refs #28621 -- Fixed crash of annotations with nested OuterRef.
2020-07-01 11:01:46 +02:00
Carlton Gibson
b5371539a9
Fixed #31752 -- Fixed intermittent test_order_by_relational_field_through_model failure.
...
Set explicit datetime for M2M ordering test.
Thanks to Mariusz Felisiak for the suggestion.
2020-06-30 13:08:23 +02:00
Sergey Fedoseev
dd5aa8cb5f
Fixed #28925 -- Fixed durations-only expressions crash on SQLite and MySQL.
...
This removes also unused DatabaseOperations.date_interval_sql().
2020-06-30 07:04:55 +02:00
Ad Timmering
ec5aa2161d
Fixed #30807 -- Fixed TestArchive.test_extract_file_permissions() when umask is 0o000.
...
Fixed test that checks permissions on files extracted from archives
with no permissions set, to not assume a default umask of 0o002.
Test regression in c95d063e77
.
2020-06-29 07:51:43 +02:00
Hannes Ljungberg
30e3d2d78d
Fixed #31745 -- Added error messages when using UniqueConstraint.include/opclasses with deferrable.
2020-06-29 06:41:23 +02:00
Mariusz Felisiak
62d85a2835
Fixed #31742 -- Fixed makemigrations crash on ForeignKey to an app with mixed case label.
...
Regression in 9e1b6b8a66
.
Thanks Ignacio Santolin for the report.
2020-06-26 23:18:59 +02:00
Mariusz Felisiak
09914ccf68
Fixed test_clean_does_deduplicate_values on Oracle after e13cfc6dfd
.
2020-06-26 22:37:58 +02:00
Hasan Ramezani
8984cab8a8
Fixed #31620 -- Added support for %V format to WeekMixin/WeekArchiveView.
...
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-06-26 11:12:57 +02:00
Jon Dufresne
feb6581993
Fixed the centering of the "Log in" button on admin login page.
...
Previously, the button's container had a padding of 9.4em which was
approximately center but not precisely. Now, the container uses
'align:text-center' to let the browser center the button.
2020-06-26 06:59:33 +02:00
Jon Dufresne
60db8b7b37
Removed unnecessary admin CSS.
...
The "object-tools" container is never rendered as a descendant of
.form-row.
The "golink" CSS class is unused.
A <label> element has not been included in the login .submit-row since
5869afe32b
.
The "help" CSS class from login.css has been unused since
0e5faf225c
.
The <label> color in login.css is already inherited from the <body>
element and so does not need to be re-specified.
The #content-main container already has the property 'width: 100%' from
base.css and so does not need to be re-specified in login.css.
The <td> and <th> font-family property is inherited from the <body>
element and so does not need to be re-specified.
The <html> element has the attribute dir which automatically sets
the text direction in the layout. Adding the direction CSS property was
necessary to support IE which does not support the dir attribute, but IE
is no longer supported, so drop the direction property.
The 'font-size: 1em' property re-specifies the same font size. It
creates no visual difference.
The 'font-size: 14px' property often re-specifies the inherited value.
Avoid re-specifying it.
2020-06-25 11:46:05 +02:00
Jon Dufresne
e13cfc6dfd
Fixed #31596 -- Changed ForeignKey.validate() to use the base manager.
2020-06-25 11:36:20 +02:00
Mariusz Felisiak
1e96de4f97
Added test for django.contrib.admin.utils.help_text_for_field().
2020-06-25 11:23:26 +02:00
Hasan Ramezani
fbe82f8255
Refs #26761 -- Removed extra space in admin change list result header.
2020-06-25 06:33:12 +02:00
Simon Charette
5227101787
Defined output_field of Func() in test_grouping_by_annotations_with_array_field_param().
...
output_field cannot be automatically determined because the first
argument passed to ARRAY_LEN is an ArrayField and the second one is an
integer.
2020-06-24 12:26:36 +02:00
Nick Pope
074844e947
Fixed #31529 -- Added support for serialization of pathlib.Path/PurePath and os.PathLike in migrations.
2020-06-24 11:45:34 +02:00
David Smith
162765d6c3
Fixed #9061 -- Allowed FormSets to disable deleting extra forms.
...
Thanks to Dan Ward for the initial patch.
2020-06-24 09:26:25 +02:00
Simon Charette
2e8941b6f9
Fixed #31735 -- Fixed migrations crash on namespaced inline FK addition on PostgreSQL.
...
The namespace of the constraint must be included when making the
constraint immediate.
Regression in 22ce5d0031
.
Thanks Rodrigo Estevao for the report.
2020-06-24 08:37:20 +02:00
Jon Dufresne
6f3e3e87ab
Fixed #31703 -- Made makemigrations name all initial migrations "initial".
...
When the MigrationAutodetector creates more than one initial migration
in a app, name all initial migrations "initial" rather than the opaque
"auto_<DATE>_<TIME>" name.
Initial migrations that have a descriptive name continue to use the
descriptive name.
2020-06-24 07:18:45 +02:00
Jon Dufresne
01195c4a83
Refs #31703 -- Added Migration.suggest_name() test for initial migration with multiple CreateModels.
2020-06-24 07:18:38 +02:00
Jon Dufresne
bce180dd05
Refs #31703 -- Moved MigrationAutodetector.suggest_name() to Migration.
...
Allows expanding the method to inspect additional attributes of the
migration instance. For example, the Migration.initial attribute.
2020-06-24 07:01:11 +02:00
Ahmad A. Hussein
798835112d
Fixed #31736 -- Fixed InspectDBTransactionalTests.test_foreign_data_wrapper crash on Windows.
2020-06-23 20:26:43 +02:00
Frantisek Holop
cc7c16af98
Fixed #31443 -- Fixed login redirection in auth mixins when LOGIN_URL is off-site URL.
2020-06-23 10:38:35 +02:00
Jon Moroney
136ec9b62b
Refs #31358 -- Added decode() to password hashers.
...
By convention a hasher which does not use a salt should populate the
decode dict with `None` rather than omit the dict key.
Co-Authored-By: Florian Apolloner <apollo13@users.noreply.github.com>
2020-06-23 08:36:59 +02:00
Adam Johnson
6e5041f57c
Removed unused param_dict return from URLResolver.resolve_error_handler().
...
Unused since its introduction in ed114e1510
.
2020-06-22 21:28:56 +02:00
Claude Paroz
258c88a913
Refs #5691 -- Made cache keys independent of USE_L10N.
...
This mostly reverts af1893c4ff
.
2020-06-22 10:55:12 +02:00
Adam Johnson
e37f809618
Combined MySQL backend server info queries.
2020-06-22 09:58:46 +02:00
Claude Paroz
e62d55a4fe
Fixed #31692 -- Prevented unneeded .po file compilation.
...
Thanks Nick Pope and Simon Charette for the reviews.
2020-06-22 08:44:16 +02:00
Claude Paroz
ed0a040773
Refs #31692 -- Updated compilemessages and tests to use pathlib.
2020-06-22 08:33:00 +02:00
Guillermo Bonvehí
f386454d13
Fixed #31728 -- Fixed cache culling when no key is found for deletion.
...
DatabaseCache._cull implementation could fail if no key was found to
perform a deletion in the table. This prevented the new cache key/value
from being correctly added.
2020-06-22 06:29:35 +02:00
David Smith
27c09043da
Refs #31670 -- Renamed whitelist argument and attribute of EmailValidator.
2020-06-18 21:43:20 +02:00
Alix
26a413507a
Fixed #6933 -- Added support for searching against quoted phrases in ModelAdmin.search_fields.
2020-06-18 20:17:20 +02:00
Tom Forbes
8a902b7ee6
Fixed #31716 -- Fixed detection of console scripts in autoreloader on Windows.
2020-06-18 13:04:10 +02:00
David Smith
10df5b7177
Refs #31670 -- Removed whitelist/blacklist terminology in docs and comments.
2020-06-17 13:15:56 +02:00
Hasan Ramezani
47651eadb8
Fixed #30583 -- Fixed handling JSONFields in XML serializer.
...
Co-authored-by: Chason Chaffin <chason@gmail.com>
2020-06-17 11:12:18 +02:00
Mariusz Felisiak
82da72b748
Refs #28077 -- Added opclasses to Index.__repr__().
...
This also removes unnecessary commas between attributes.
2020-06-17 10:32:43 +02:00
Florian Apolloner
1621f06051
Fixed #30472 -- Made Argon2PasswordHasher use Argon2id.
2020-06-17 08:10:41 +02:00
Florian Apolloner
ee49cf4f35
Added test for old Argon2i hashes with version attribute.
2020-06-17 08:10:41 +02:00
Mariusz Felisiak
78c811334c
Refs #30190 -- Minor edits to JSONL serializer.
...
Follow up to e29637681b
.
2020-06-17 07:59:40 +02:00
Mariusz Felisiak
e36028fb9c
Reverted "Pinned asgiref == 3.2.7 in test requirements."
...
This reverts commit dcb4d79ef7
.
2020-06-17 07:08:51 +02:00
Ali Vakilzade
e29637681b
Fixed #30190 -- Added JSONL serializer.
2020-06-16 16:51:58 +02:00
Simon Charette
ea3beb4f5a
Refs #30446 -- Defined default output_field of text database functions.
...
This prevented the default behavior of
BaseExpression._resolve_output_field from error'ing out when such
functions accepted both expressions from mixed types
(e.g. SubStr(CharField, IntegerField, IntegerField)).
2020-06-16 10:08:02 +02:00
Hannes Ljungberg
0d6d4e78b1
Fixed #31709 -- Added support for opclasses in ExclusionConstraint.
2020-06-16 08:16:14 +02:00
Mariusz Felisiak
dcb4d79ef7
Pinned asgiref == 3.2.7 in test requirements.
2020-06-16 07:54:41 +02:00
Hannes Ljungberg
7edc6e53a7
Fixed #31702 -- Added support for PostgreSQL opclasses in UniqueConstraint.
2020-06-16 07:19:00 +02:00
John Parton
a8473b4d34
Fixed #31691 -- Added ordering support to JSONBAgg.
2020-06-13 00:06:29 +02:00
Hannes Ljungberg
e0cdd0fcf5
Fixed #31649 -- Added support for covering exclusion constraints on PostgreSQL 12+.
2020-06-12 23:23:21 +02:00
Hasan Ramezani
9e8edc1e55
Fixed #31491 -- Allowed 'password' option in DATABASES['OPTIONS'] on MySQL.
2020-06-12 12:07:43 +02:00
Chinmoy Chakraborty
2928019e0c
Fixed #31645 -- Enhanced the migration warning for migrate commmand.
...
Added the list of apps with changes not reflected in migrations.
2020-06-12 10:26:06 +02:00
Mariusz Felisiak
aeb8996a67
Fixed #31659 -- Made ExpressionWrapper preserve output_field for combined expressions.
...
Regression in df32fd42b8
.
Thanks Simon Charette for the review.
2020-06-12 07:20:06 +02:00
Adam Johnson
5776a1660e
Fixed #31667 -- Made __in lookup ignore None values.
2020-06-11 12:12:26 +02:00
Michael Brown
36db4dd937
Fixed #28132 -- Made MultiPartParser ignore filenames with trailing slash.
2020-06-11 08:46:59 +02:00
Hasan Ramezani
037a624120
Fixed #31657 -- Fixed ordering by attnames of self-referential ForeignKeys.
2020-06-10 11:14:26 +02:00
Hasan Ramezani
c1f7de8acc
Refs #31657 -- Added test for ordering by self-referential ForeignKeys.
2020-06-10 11:11:20 +02:00
Hasan Ramezani
a59de6e89e
Fixed #31675 -- Added warning to ExceptionReporter when exception chain has a cycle.
2020-06-10 09:23:33 +02:00
Joshua Massover
92309e53d9
Fixed #31594 -- Added ASGIStaticFilesHandler.get_response_async().
2020-06-08 12:52:26 +02:00
Nicolas Baccelli
b38d44229f
Fixed #31664 -- Reallowed using non-expressions having filterable attribute as rhs in queryset filters.
...
Regression in 4edad1ddf6
.
2020-06-08 08:17:23 +02:00
Mariusz Felisiak
78ad4b4b02
Fixed #31660 -- Fixed queryset crash when grouping by m2o relation.
...
Regression in 3a941230c8
.
Thanks Tomasz Szymański for the report.
2020-06-08 07:21:54 +02:00
davidchorpash
07506a6114
Fixed #31661 -- Removed period in makemigrations history check warning.
2020-06-08 06:46:23 +02:00
Sasha Pachev
38a21f2d9e
Fixed #31663 -- Made DecimalField.to_python() handle non-numeric invalid values.
2020-06-05 21:13:36 +02:00
David Smith
433dd737f9
Fixed #20347 -- Allowed customizing the maximum number of instantiated forms in formsets.
...
Co-authored-by: ethurgood <ethurgood@gmail.com>
2020-06-05 12:01:32 +02:00
David Smith
b5aa9cb20f
Refs #20347 -- Added test for formset_factory()'s absolute_max default.
...
Co-authored-by: ethurgood <ethurgood@gmail.com>
2020-06-05 10:00:25 +02:00
Mariusz Felisiak
926148ef01
Fixed #31654 -- Fixed cache key validation messages.
2020-06-05 07:21:52 +02:00
Mariusz Felisiak
f83b44075d
Refs #30913 -- Added system checks for covering indexes and unique constraints support.
2020-06-04 12:26:25 +02:00
Hannes Ljungberg
8c7992f658
Fixed #30913 -- Added support for covering indexes on PostgreSQL 11+.
2020-06-04 12:26:22 +02:00
Jon Dufresne
f47d5aac62
Refs #27804 -- Used subTest() in tests.utils_tests.test_text.
2020-06-04 11:16:21 +02:00
Claude Paroz
9e57b1efb5
Fixed #30134 -- Ensured unlocalized numbers are string representation in templates.
2020-06-04 10:34:54 +02:00
Claude Paroz
51250d2f12
Refs #30134 -- Added test for {% localize off %} tag with format settings.
2020-06-04 10:34:54 +02:00
Tim Graham
a7b4a04d6c
Refs #31630 -- Added CharField and IntegerField to DatabaseFeatures.introspected_field_types.
...
CockroachDB introspects CharField as TextField and IntegerField as
BigIntegerField.
2020-06-04 08:46:06 +02:00
Tim Graham
e24b63fe85
Refs #31630 -- Removed DatabaseFeatures.can_introspect_autofield.
2020-06-04 08:27:46 +02:00
Hasan Ramezani
e198beadad
Fixed #31630 -- Replaced introspection features with DatabaseFeatures.introspected_field_types.
2020-06-04 08:27:42 +02:00
David Smith
dbdc192ca3
Preferred usage of among/while to amongst/whilst.
2020-06-03 21:02:48 +02:00
Mariusz Felisiak
229c9c6653
Refs CVE-2020-13254 -- Fixed cache.tests when KEY_PREFIX is defined.
...
Follow up to 2c82414914
.
2020-06-03 13:00:37 +02:00
Dan Palmer
2c82414914
Fixed CVE-2020-13254 -- Enforced cache key validation in memcached backends.
2020-06-03 09:24:26 +02:00
Jon Dufresne
2dd4d110c1
Fixed CVE-2020-13596 -- Fixed potential XSS in admin ForeignKeyRawIdWidget.
2020-06-03 09:23:00 +02:00
Thodoris Sotiropoulos
df32fd42b8
Fixed #31651 -- Made ExpressionWrapper use grouping columns from wrapped expression.
2020-06-03 07:29:41 +02:00
Adam Johnson
22a59c01c0
Refs #31615 -- Added EXISTS clauses to extension operations.
2020-06-03 07:02:48 +02:00
Carles Pina
e46c2326c8
Fixed #31536 -- Fixed rendering of disabled AdminFileWidget and ClearableFileInput.
2020-06-01 12:25:25 +02:00
René Fleschenberg
578b3046e3
Reverted "Refs #23919 -- Removed obsolete __init__.py files in management command directories."
...
This reverts commit ccc25bfe4f
.
https://groups.google.com/d/topic/django-developers/GVHMH2ciAnk/discussion
2020-06-01 10:55:41 +02:00
Carlton Gibson
dd1ca50b09
Fixed #31570 -- Corrected translation loading for apps providing territorial language variants with different plural equations.
...
Regression in e3e48b0012
.
Thanks to Shai Berger for report, reproduce and suggested fix.
2020-06-01 08:38:54 +02:00
David Smith
0382ecfe02
Fixed #28694 -- Made django.utils.text.slugify() strip dashes and underscores.
2020-05-29 06:47:51 +02:00
David Smith
dde05e192c
Added more tests for slugify().
2020-05-29 06:28:57 +02:00
Adam Johnson
fa58450a9a
Fixed #31468 -- Allowed specifying migration filename in Operation.
...
This adds also suggested filename for many built-in operations.
2020-05-28 11:42:53 +02:00
Adam Johnson
5bd585a82d
Refs #31468 -- Added tests for MigrationAutodetector.suggest_name().
2020-05-28 11:24:58 +02:00
Tom Carrick
780473d756
Refs #31034 -- Improved accessibility of admin navigation sidebar.
2020-05-28 10:16:20 +02:00
Mariusz Felisiak
42de52affe
Fixed isolation of test_migrate_fake_initial.
2020-05-28 09:32:43 +02:00
Scott Cranfill
62f1655a64
Fixed #11157 -- Stopped removing stop words in admin's prepopulated_fields.
...
Co-Authored-By: Andy Chosak <andy@chosak.org>
2020-05-27 12:32:56 +02:00
Frantisek Holop
d693a086de
Fixed #31615 -- Made migrations skip extension operations if not needed.
...
- Don't try to create an existing extension.
- Don't try to drop a nonexistent extension.
2020-05-27 10:48:44 +02:00
Frantisek Holop
73216aaaa9
Used not installed extension in CreateExtension() tests.
...
uuid-ossp was already installed.
2020-05-27 10:46:22 +02:00
Ahmad A. Hussein
7c947f0f5a
Fixed #31494 -- Preserved query strings when following HTTP 307/308 redirects in test client.
2020-05-27 10:36:52 +02:00
Ahmad A. Hussein
6425fd3124
Refs #31494 -- Added test for query strings for GET/HEAD requests when following HTTP 307/308 redirects in test client.
2020-05-27 10:36:52 +02:00
Mariusz Felisiak
f4bab0982a
Refs #31614 -- Added test for ordering by OrderBy() of combined queryset with not selected columns.
2020-05-27 09:03:53 +02:00
Ryan Heard
587b179d41
Fixed #31606 -- Allowed using condition with lookups in When() expression.
2020-05-27 07:32:23 +02:00
Laurent Tramoy
2aac176e86
Fixed #31614 -- Fixed aliases ordering by OrderBy() expressions of combined queryset.
2020-05-26 21:14:45 +02:00
Laurent Tramoy
51ad767d0b
Refs #31614 -- Added test for aliases ordering on combined querysets.
2020-05-26 21:14:40 +02:00
Laurent Tramoy
50f71ccb36
Used operator.attrgetter() in test_qs_combinators.
2020-05-26 21:14:40 +02:00
Nan Liu
33c365781a
Fixed #31416 -- Made autodetector find dependencies for MTI model creation on base fields removal.
...
Removing a base field must take place before adding a new inherited
model that has a field with the same name.
2020-05-26 07:26:07 +02:00
Hasan Ramezani
18759b2209
Fixed #31616 -- Added hint about middleware ordering for SessionMiddleware admin check.
2020-05-25 21:14:32 +02:00
Claude Paroz
adf58311b8
Fixed #29078 -- Made serializers respect prefetch_related() for m2m fields.
2020-05-25 10:45:16 +02:00
Claude Paroz
b547c42661
Improved HTTPSitemapTests.test_localized_priority.
...
Override setting instead of skipping.
Use translation override context manager to avoid language leaking.
2020-05-25 09:07:50 +02:00
Simon Charette
972000420e
Fixed #31624 -- Avoided subquery usage on QuerySet.all().delete().
...
Thanks Adam Johnson for the report.
Regression in 7acef095d7
.
2020-05-25 08:14:49 +02:00
Jon Dufresne
dfb9ae1d23
Refs #30400 -- Improved typography in admin_doc/missing_docutils.html.
2020-05-23 12:02:10 +02:00
Hasan Ramezani
c60524c658
Fixed #31546 -- Allowed specifying list of tags in Command.requires_system_checks.
2020-05-21 12:34:54 +02:00
Manuel Weitzman
a4e6030904
Fixed #30375 -- Added FOR NO KEY UPDATE support to QuerySet.select_for_update() on PostgreSQL.
2020-05-21 10:51:10 +02:00
Jon Dufresne
81d69568a6
Made test_once a keyword argument in template_tests.utils.setup().
...
Replaces the kwargs.get(...) pattern. Helps avoid typos by providing a
better error message in case of misuse.
2020-05-21 08:09:19 +02:00
Fran Hrzenjak
4484bc1b2f
Fixed #31597 , #31603 -- Corrected admin clear all filters link behavior.
...
- Show "Clear all filters" only when any filter is selected.
- Preserve query string not related with filters.
Co-Authored-By: Hasan Ramezani <hasan.r67@gmail.com>
2020-05-20 21:08:47 +02:00
Hasan Ramezani
3c7bf39e23
Fixed #31410 -- Added system checks for invalid model field names in UniqueConstraint.
2020-05-20 10:56:55 +02:00
David Smith
e875fac886
Removed unused variable in test_datetimefield_clean_input_formats.
2020-05-20 06:02:28 +02:00
Mariusz Felisiak
a125da6a7c
Fixed #31607 -- Fixed evaluated Subquery equality.
...
Regression in 691def10a0
.
2020-05-19 22:44:57 +02:00
Mariusz Felisiak
b739f2e91d
Refs #30727 -- Added tests for Subquery with queryset in kwargs pickle without evaluating it.
2020-05-19 22:44:57 +02:00
Mariusz Felisiak
20a8a443f0
Fixed #31578 -- Dropped support for MySQL 5.6.
2020-05-19 10:56:39 +02:00
wtkm11
9756c33429
Fixed #31504 -- Allowed calling makemigrations without an active database connection.
2020-05-19 10:24:23 +02:00
Hannes Ljungberg
952afc166c
Fixed #31601 -- Fixed SearchHeadlineTests on PostgresSQL 9.6.18+, 10.13+, 11.8+, and 12.3+.
2020-05-19 07:46:22 +02:00
Jon Dufresne
3b1cb78063
Used assertIs(…, True) in model_forms.tests.ValidationTest.
2020-05-18 09:25:26 +02:00
Jon Dufresne
7070d46114
Updated docutils link to HTTPS and new location.
2020-05-18 08:45:31 +02:00
Tim Graham
f59a2b7306
Refs #12990 -- Added DatabaseFeatures.has_json_operators.
...
CockroachDB also has them.
2020-05-18 08:12:20 +02:00
Simon Charette
94f63b926f
Refs #31395 -- Relied on setUpTestData() test data isolation in various tests.
2020-05-15 20:22:56 +02:00
Simon Charette
3cf80d3fcf
Fixed #31395 -- Made setUpTestData enforce in-memory data isolation.
...
Since it's introduction in Django 1.8 setUpTestData has been suffering
from a documented but confusing caveat due to its sharing of attributes
assigned during its execution with all test instances.
By keeping track of class attributes assigned during the setUpTestData
phase its possible to ensure only deep copies are provided to test
instances on attribute retreival and prevent manual setUp gymnastic to
work around the previous lack of in-memory data isolation.
Thanks Adam Johnson for the extensive review.
2020-05-15 20:22:52 +02:00
Simon Charette
1dd96f731d
Refs #13227 -- Adjusted a test to avoid making a shared test model unpickable.
...
This allowed the Note model to be used in setUpTestData() which requires
assigned model instances to be copy.deepcopy()'able.
2020-05-15 20:22:51 +02:00
Paolo Melchiorre
0e3b0da2e3
Fixed #31552 -- Added support for LZMA and XZ fixtures to loaddata.
2020-05-15 11:30:28 +02:00
François Freitag
2e48cf6bd9
Fixed fixtures loading isolation in tests.
...
fixture1.json and fixture2.json exist in both "fixtures" and
"fixtures_model_package". Both apps are listed in "INSTALLED_APPS". The
loaddata management command loads from installed apps, thus loads both
fixtures when a test runs loaddata with any of these fixtures.
2020-05-15 09:14:05 +02:00
kjpc-tech
099bce1bf0
Fixed #31590 -- Fixed ModelAdmin.date_hierarchy crash with an empty QuerySet.
...
Regression in 55cdf6c52d
.
2020-05-15 06:35:10 +02:00
Jon Dufresne
81ffedaacc
Fixed #31524 -- Removed minified static assets from the admin.
2020-05-14 16:07:56 +02:00
Carlton Gibson
6c19c2ca51
Corrected indentation in test case.
2020-05-14 15:32:36 +02:00
Jon Dufresne
129193328e
Added Selenium test coverage for actions.js.
2020-05-14 15:32:36 +02:00
Mariusz Felisiak
3a941230c8
Fixed #31584 -- Fixed crash when chaining values()/values_list() after Exists() annotation and aggregation on Oracle.
...
Oracle requires the EXISTS expression to be wrapped in a CASE WHEN in
the GROUP BY clause.
Regression in efa1908f66
.
2020-05-14 15:07:08 +02:00
David Smith
03537e2458
Completed lorem tag test coverage.
2020-05-14 12:36:38 +02:00
Jon Dufresne
d522b51c40
Fixed #31575 -- Added system check for admin sidebar request context processor dependency.
...
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2020-05-14 11:00:51 +02:00
Simon Charette
adfbf653dc
Fixed #31568 -- Fixed alias reference when aggregating over multiple subqueries.
...
691def10a0
made all Subquery() instances
equal to each other which broke aggregation subquery pushdown which
relied on object equality to determine which alias it should select.
Subquery.__eq__() will be fixed in an another commit but
Query.rewrite_cols() should haved used object identity from the start.
Refs #30727 , #30188 .
Thanks Makina Corpus for the report.
2020-05-14 09:31:15 +02:00
Simon Charette
42c08ee465
Fixed #31566 -- Fixed aliases crash when chaining values()/values_list() after annotate() with aggregations and subqueries.
...
Subquery annotation references must be resolved if they are excluded
from the GROUP BY clause by a following .values() call.
Regression in fb3f034f1c
.
Thanks Makina Corpus for the report.
2020-05-14 08:16:16 +02:00
Mariusz Felisiak
e536fa5ce1
Fixed #31579 -- Dropped support for PostgreSQL 9.5 and PostGIS 2.2.
2020-05-14 06:33:00 +02:00
Mariusz Felisiak
18eb852874
Fixed #31576 -- Fixed selenium tests with headless mode.
...
Horizontal scrollbar doesn't appear with the headless mode on small
windows, that's why window.scrollTo() is not an option for these
tests.
Tests changed after adding a navigation sidebar in
46fe506445
.
2020-05-13 15:07:21 +02:00
Hasan Ramezani
01a381cc17
Fixed #31580 -- Added error messages on distinct() following union(), intersection(), and difference().
2020-05-13 14:44:10 +02:00
François Freitag
49ae7ce50a
Removed redundant assertions in fixtures tests.
2020-05-13 13:07:15 +02:00
Claude Paroz
d4c5ef3ebb
Renamed PROJ.4 to PROJ.
2020-05-13 10:30:30 +02:00
François Freitag
f9d13a1b5a
Removed unused fixture2.xml from fixtures_model_package tests.
2020-05-13 09:13:02 +02:00
François Freitag
c8bebbd541
Disabled management commands output with verbosity 0 in various tests.
2020-05-13 09:12:43 +02:00
Mariusz Felisiak
f2187a227f
Increased the default PBKDF2 iterations for Django 3.2.
2020-05-13 09:07:51 +02:00
Mariusz Felisiak
d106d07f73
Advanced deprecation warnings for Django 3.2.
2020-05-13 09:07:51 +02:00
Claude Paroz
58f1b07e49
Fixed #30678 -- Added support for GDAL 3.
2020-05-12 09:06:06 +02:00
Mariusz Felisiak
0668164b4a
Fixed E128, E741 flake8 warnings.
2020-05-12 08:52:23 +02:00
Tom Carrick
d24ba1be7a
Fixed #31034 -- Added a navigation sidebar to the admin.
...
Co-authored-by: elky <elky@users.noreply.github.com>
Co-authored-by: Goetz <goetz.buerkle@gmail.com>
2020-05-11 18:16:38 +02:00
Jon Dufresne
d6aff369ad
Refs #30116 -- Simplified regex match group access with Match.__getitem__().
...
The method has been available since Python 3.6. The shorter syntax is
also marginally faster.
2020-05-11 12:01:28 +02:00
Adam Johnson
a8b2db1cae
Optimized Model and QuerySet pickling version comparison.
2020-05-11 09:50:11 +02:00
Jon Dufresne
72a170b4c3
Fixed #25236 -- Deprecated {% ifequal %} and {% ifnotequal %} template tags.
...
The {% if %} tag provides all features of these tags.
Since Django 1.2 (May 17, 2010), the docs have hinted that
{% ifequal %} and {% ifnotequal %} will be deprecated in a future
Django version. Time to make it official.
2020-05-11 09:07:33 +02:00
Jon Dufresne
d8cb8fdf40
Switched unittest.TestCase to SimpleTestCase in template_tests/test_nodelist.py.
2020-05-11 07:56:11 +02:00
Yash Saini
ccb1cfb64e
Fixed #31548 -- Fixed URLValidator crash on non-strings.
2020-05-08 20:53:05 +02:00
Yash Saini
bda6ade7b7
Added URLValidator test for missing scheme.
2020-05-08 20:50:25 +02:00
Hasan Ramezani
87faeee4e0
Fixed #31528 -- Made collectstatic management command run staticfiles checks.
2020-05-08 12:47:57 +02:00
François Freitag
01f8d19ef9
Fixed tests isolation in logging_tests.
...
The SetupConfigureLogging test case does not restore the logging config
after its execution. It leaves the logger django.request with an empty
handlers array.
This also removes the last use of LOGGING_CONFIG, introduced in
43503b093a
.
2020-05-08 10:49:34 +02:00
dbxnr
fc0f7f6c15
Fixed #31157 -- Fixed displaying read-only JSONField values in admin.
2020-05-08 09:44:42 +02:00
dbxnr
675ce4dd35
Refs #31157 -- Added tests for display_for_field() with empty JSONField.
2020-05-08 09:37:49 +02:00
Paolo Melchiorre
2e0f04507b
Added tests for loaddata with gzip/bzip2 compressed fixtures.
...
Co-authored-by: Adam Johnson <me@adamj.eu>
2020-05-08 08:16:50 +02:00
sage
6789ded0a6
Fixed #12990 , Refs #27694 -- Added JSONField model field.
...
Thanks to Adam Johnson, Carlton Gibson, Mariusz Felisiak, and Raphael
Michel for mentoring this Google Summer of Code 2019 project and
everyone else who helped with the patch.
Special thanks to Mads Jensen, Nick Pope, and Simon Charette for
extensive reviews.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-05-08 07:23:31 +02:00
Mariusz Felisiak
f97f71f592
Refs #12990 -- Bumped mysqlclient requirement to >= 1.4.0.
...
MySQLdb.constants.FIELD_TYPE.JSON was added in mysqlclient 1.4.0rc2.
2020-05-08 06:14:42 +02:00
Mariusz Felisiak
106e8dc91a
Completed test coverage for ExclusionConstraint.
...
Dropping exclusion constraints was untested.
2020-05-07 10:02:14 +02:00
Carlton Gibson
92507bf3ea
Fixed #31515 -- Made ASGIHandler dispatch lifecycle signals with thread sensitive.
2020-05-06 09:42:02 +02:00
Adam Johnson
1c2c6f1b51
Fixed a/an typos in "SQL" usage.
2020-05-06 06:35:26 +02:00
Mariusz Felisiak
fb52176a6f
Made DateTimePickerShortcutsSeleniumTests.test_date_time_picker_shortcuts() less flaky.
...
Moved picking the current time closer to the actual click.
2020-05-05 11:00:05 +02:00
Mariusz Felisiak
b73e66e758
Fixed #31538 -- Fixed Meta.ordering validation lookups that are not transforms.
...
Regression in 440505cb2c
.
Thanks Simon Meers for the report.
2020-05-05 09:08:29 +02:00
David Smith
2522559d1a
Fixed #31534 -- Deprecated django.conf.urls.url().
2020-05-05 07:34:34 +02:00
Adam Johnson
d17b380653
Refs #30573 -- Rephrased "Of Course" and "Obvious(ly)" in documentation and comments.
2020-05-04 12:10:47 +02:00
Rasmus Wriedt Larsen
f6d0bd208a
Corrected opts argument of colorize in TermColorTests.test_colorize_empty_text().
2020-05-04 11:34:08 +02:00
Tom Forbes
c00bc27945
Refs #30372 -- Stopped watching built-in Django translation files by auto-reloader.
2020-05-04 09:13:47 +02:00
Nick Pope
8f10ceaa90
Changed `'%s' % value` pattern to `str(value)`.
2020-05-04 08:27:18 +02:00
François Freitag
a0df5dea33
Removed unnecessary inner methods in CreatesuperuserManagementCommandTestCase.
2020-05-01 20:51:44 +02:00
Ian Foote
b4068bc656
Fixed #31455 -- Added support for deferrable exclusion constraints on PostgreSQL.
2020-05-01 09:08:36 +02:00
Ian Foote
c226c6cb32
Fixed #20581 -- Added support for deferrable unique constraints.
2020-04-30 10:43:50 +02:00
Mariusz Felisiak
555e3a848e
Removed unused __str__() methods in tests models.
...
Follow up to 6461583b6c
.
2020-04-30 09:13:23 +02:00
Hasan Ramezani
f121621073
Fixed #31521 -- Skipped test_parsing_rfc850 test on 32-bit systems.
2020-04-30 06:51:47 +02:00
Mariusz Felisiak
54646a423b
Refs #27468 -- Made user sessions use SHA-256 algorithm.
2020-04-29 16:45:00 +02:00
Jon Dufresne
0dafadadb9
Refs #30400 -- Improved typography of user facing strings in admin changelist.
2020-04-29 07:01:46 +02:00
Jon Dufresne
bdff97d373
Added tests for saving with pending actions in admin changelist.
2020-04-29 07:01:41 +02:00
Hasan Ramezani
68fc21b378
Fixed #29249 -- Made JSON and YAML serializers use Unicode by default.
2020-04-28 11:11:39 +02:00
Hasan Ramezani
8970bb4cfd
Refs #29249 -- Added tests for serializing Unicode data with XML serializer.
2020-04-28 11:11:39 +02:00
François Freitag
9ef4a18dbe
Changed django.forms.ValidationError imports to django.core.exceptions.ValidationError.
...
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-04-28 10:49:00 +02:00
Richard Campen
67b334fbaf
Fixed #31517 -- Fixed HashedFilesMixin.hashed_name() if hash of the file is None.
2020-04-28 08:25:07 +02:00
François Freitag
f19bb54fb1
Added test for squashmigrations' output.
2020-04-28 06:32:43 +02:00
François Freitag
abea86f9e4
Removed unnecessary tuple wrapping of single format string argument.
2020-04-27 08:30:16 +02:00
François Freitag
687cb38a05
Removed unnecessary capturing/hiding of stdout/stderr in various tests.
2020-04-27 08:06:12 +02:00
François Freitag
a8d175c297
Disabled management commands output with verbosity 0 in test_regression_22823_unmigrated_fk_to_migrated_model.
2020-04-27 07:43:09 +02:00
François Freitag
da606513db
Removed unnecessary capturing of stdout in test_makemigrations_non_interactive_not_null_addition.
2020-04-25 20:53:53 +02:00
Tim Schilling
a92cc84b4a
Refs #31369 -- Deprecated models.NullBooleanField in favor of BooleanField(null=True).
2020-04-24 10:10:45 +02:00
David Wobrock
533b208775
Fixed #29224 -- Fixed removing index_together indexes if exists unique_together constraint on the same fields.
2020-04-23 12:28:51 +02:00
Hannes Ljungberg
447980e72a
Fixed #31500 -- Fixed detecting of unique fields in QuerySet.in_bulk() when using Meta.constraints.
...
Detection of unique fields now takes into account non-partial unique
constraints.
2020-04-23 08:07:08 +02:00
Jon Dufresne
d15d824deb
Refs #29892 -- Fixed selenium test test_inline_formset_error_input_border on Firefox.
...
Firefox does not include shorthand properties, such as "border", in the
computed CSS properties object. This is documented at MDN:
https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle
> The returned CSSStyleDeclaration object contains active values for CSS
> property longhand names. For example, border-bottom-width instead of
> the border-width and border shorthand property names. It is safest to
> query values with only longhand names like font-size. Shorthand names
> like font will not work with most browsers.
This difference between Firefox and Chrome is also discussed in the
stackoverflow thread at:
https://stackoverflow.com/a/32296604
2020-04-22 12:32:35 +02:00
David Smith
9a015f4e0d
Completed test coverage for forms.RegexField.
2020-04-22 10:50:35 +02:00
Simon Charette
06889d6206
Fixed #31499 -- Stored ModelState.fields into a dict.
...
This allows the removal of its O(n) .get_field_by_name method and many
other awkward access patterns.
While fields were initially stored in a list to preserve the initial
model definiton field ordering the auto-detector doesn't take field
ordering into account and no operations exists to reorder fields of a
model.
This makes the preservation of the field ordering completely superflous
because field reorganization after the creation of the model state
wouldn't be taken into account.
2020-04-22 07:10:00 +02:00
Simon Charette
696024fb73
Refs #31499 -- Ignored field ordering to determine ModelState equality.
2020-04-22 06:20:54 +02:00
Mariusz Felisiak
d5898db50e
Fixed backends.oracle.test_operations.
...
Using unittest.TestCase doesn't work properly when we perform db
queries. Moreover introspection is extremely slow on Oracle without
limiting models to a "backends" app.
Follow up to 8bcca47e83
.
2020-04-21 15:46:18 +02:00
Jon Dufresne
75866b93cc
Fixed #31479 -- Added support to reset sequences on SQLite.
2020-04-21 10:41:47 +02:00