1
0
mirror of https://github.com/django/django.git synced 2025-03-06 07:22:32 +00:00

11119 Commits

Author SHA1 Message Date
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
43503b093a35ca4707c16d865f10929960bfa0b8.
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 440505cb2cadbe1a5b9fba246bcde6c04f51d07e.

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 6461583b6cc257d25880ef9a9fd7e2125ac53ce1.
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 8bcca47e8356521f52f0738d9633befd53007cae.
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
Simon Charette
5220ca8d8a Refs #30591 -- Adjusted table rebuild for non-pk relationship on SQLite.
The existing code was only accounting for primary key changes and not
all unique key fields that can be referenced.
2020-04-21 08:37:47 +02:00
Simon Charette
a548280857 Fixed #31064 -- Recreated auto-created many-to-many tables on primary key data type change on SQLite.
Both local and remote auto-created many-to-many relationships were
affected.
2020-04-21 08:37:40 +02:00
Simon Charette
2ba55b2905 Removed redundant import in tests/migrations/test_operations.py. 2020-04-21 08:37:37 +02:00
Jon Dufresne
505fec6bad Capitalized Unicode in docs, strings, and comments. 2020-04-20 12:10:33 +02:00
Jon Dufresne
3152146e3a
Added assertions for an empty stdout to CoreCommandsNoOutputTests. 2020-04-20 11:32:03 +02:00
Hasan Ramezani
35a67b3731 Fixed #31474 -- Made QuerySet.delete() not return the number of deleted objects if it's zero. 2020-04-20 09:51:54 +02:00