Commit Graph

28197 Commits

Author SHA1 Message Date
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
Mariusz Felisiak fb9b1c245d
Updated admin's XRegExp to 3.2.0. 2020-04-22 08:45:14 +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
Jon Dufresne 0f2885e3f6
Simplified collapse.js with Element.closest(). 2020-04-22 06:13:58 +02:00
Jon Dufresne 290eb98764
Improved readability of ESLint configuration.
Use "off"/"warn"/"error" instead of 0/1/2.
2020-04-21 21:09:28 +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
Mariusz Felisiak 150c3d13a6 Refs #29983 -- Fixed displaying pathlib.Path database name in flush command's inputs. 2020-04-21 12:08:25 +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
Simon Charette 330c0ed7c4 Stopped rebuilding referenced tables multiple times on SQLite alterations. 2020-04-20 13:13:57 +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
Jignesh Kotadiya 7b4bd2a82c
Refs #22463 -- Replaced JSHint with ESLint in contributing docs. 2020-04-20 10:53:00 +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
François Freitag c86201b6ed Disabled management commands output with verbosity 0 in various tests.
Instead of capturing the command output and discard it immediately,
tell the command not to log.
2020-04-20 09:09:26 +02:00
François Freitag 45e96b4d9d
Removed unnecessary capturing of stdout/stderr in auth_tests.test_management. 2020-04-20 09:08:43 +02:00
David Smith 2014319159
Updated iTunes podcast format link in syndication docs. 2020-04-20 08:10:13 +02:00
Jon Dufresne fb21625270
Refs #30165 -- Removed obsolete doc references to deprecated ugettext() & co.
The u-prefixed variants were removed from the documentation in
6eb4996672.
2020-04-20 07:57:24 +02:00
Jon Dufresne 5673d4b102
Fixed #31477 -- Removed "using" argument from DatabaseOperations.execute_sql_flush(). 2020-04-20 07:49:35 +02:00
Jon Dufresne 661e39c8d5 Fixed #24559 -- Made MigrationLoader.load_disk() catch more specific ModuleNotFoundError.
Avoids inspecting the exception message, which is not considered a
stable API and can change across Python versions.

ModuleNotFoundError was introduced in Python 3.6. It is a subclass of
ImportError that is raised when the imported module does not exist. It
is not raised for other errors that can occur during an import. This
exception instance has the property "name" which holds the name of
module that failed to import.
2020-04-20 07:22:20 +02:00
Tom Forbes 141ab6bc6d Refs #29069 -- Added test for calling request_finished signal by static file responses.
Fixed in 41a3b3d186.
2020-04-20 06:17:57 +02:00
Jon Dufresne 537d422942
Simplified LongNameTest.test_sequence_name_length_limits_flush() with execute_sql_flush(). 2020-04-18 20:48:30 +02:00
hashlash dfbd9ca065 Fixed #30311 -- Restored ability to override global admin actions. 2020-04-17 20:23:00 +02:00
Jon Dufresne 75410228df Fixed #31473 -- Made sql_flush() use RESTART IDENTITY to reset sequences on PostgreSQL.
The sql_flush() positional argument sequences is replaced by the boolean
keyword-only argument reset_sequences. This ensures that the old
function signature can't be used by mistake when upgrading Django. When
the new argument is True, the sequences of the truncated tables will
reset. Using a single boolean value, rather than a list, allows making a
binary yes/no choice as to whether to reset all sequences rather than a
working on a completely different set.
2020-04-17 11:57:24 +02:00
Jon Dufresne 8005829bb9 Simplified DatabaseOperations.sql_flush() on Oracle and PostgreSQL.
Added early return to decrease an indentation level.
2020-04-17 10:46:19 +02:00
Jon Dufresne 8bcca47e83 Added test coverage for DatabaseOperations.sql_flush(). 2020-04-17 09:52:43 +02:00
Mariusz Felisiak eeab63e57e
Refs #26552 -- Made reloading the database for tests check only loaded tables constraints. 2020-04-17 08:14:27 +02:00
Mariusz Felisiak 4c9886085b
Refs #31351 -- Made partial constraints tests use required_db_features.
This will notably silence the warnings issued when running the test
suite on MySQL and MariaDB.
2020-04-17 07:45:52 +02:00
Hasan Ramezani 7b31ba541f Fixed #29329 -- Made datetime logging from runserver more consistent.
Setting default_msec_format=None will make it the same, unfortunately
it's not supported by Python, see https://bugs.python.org/issue40300.
2020-04-16 12:55:53 +02:00
Hasan Ramezani 96c6f9c61c Fixed #31441 -- Ensured TabluarInline expands when child inputs have errors. 2020-04-16 12:17:49 +02:00
Hasan Ramezani b4e7bf5284 Refs #31441 -- Added red border to inputs with errors for TabluarInline. 2020-04-16 12:17:49 +02:00
Nick Pope 058b38b43e
Improved message example in admin actions documentation.
Avoid partial string construction and make use of ``ngettext`` to show
example of how to handle plural variants with translations. Also make
use of ``messages.SUCCESS`` to highlight customizing the style of the
message - in this case it better fits what the message is conveying.
2020-04-16 11:26:33 +02:00
Nick Pope daabb102c0 Fixed #31470 -- Fixed fieldset admin CSS to prevent overflowing <pre> elements.
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-04-16 10:47:42 +02:00
Author: Mads Jensen 6461583b6c Removed unused __str__() methods in tests models.
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-Authored-By: Hasan Ramezani <hasan.r67@gmail.com>
2020-04-15 20:20:32 +02:00
Mariusz Felisiak f1a808a502 Used :rfc: role in various docs. 2020-04-15 18:31:30 +02:00
Claude Paroz 71c4fb7beb Refs #27468 -- Changed default Signer algorithm to SHA-256. 2020-04-15 12:49:14 +02:00
Adam Johnson 4bb33bb074 Fixed #31459 -- Fixed handling invalid indentifiers in URL path conversion.
This patch adjusted existing tests that used invalid identifiers.
2020-04-15 11:29:35 +02:00
sobolevn 578c03b276 Fixed #31223 -- Added __class_getitem__() to Manager and QuerySet. 2020-04-15 11:26:11 +02:00
Mariusz Felisiak fc0b48d2e7
Fixed typo in docs/ref/templates/builtins.txt. 2020-04-15 10:41:19 +02:00
infosrabah 25afe59d34 Fixed #31268 -- Updated Algerian Arabic (ar_DZ) locale formats. 2020-04-15 09:51:56 +02:00
Ichlasul Affan 3e7c39f710 Fixed #31451 -- Made settings cleansing work with list and tuple settings. 2020-04-15 09:18:40 +02:00
007 d51c50d836 Fixed #31462 -- Allowed overriding autocomplete/raw_id_fields/filter widgets for ManyToManyFields with formfield_overrides. 2020-04-15 08:33:40 +02:00
Adam Johnson 5b884d45ac Fixed #29501 -- Allowed dbshell to pass options to underlying tool. 2020-04-14 14:02:51 +01:00
Adam Johnson 8e8c3f964e Refs #29501 -- Allowed customizing exit status for management commands. 2020-04-14 13:22:47 +02:00
Adam Johnson 6cad911674 Refs #29501 -- Simplified BaseCommand.run_from_argv() a bit. 2020-04-14 13:22:47 +02:00
Adam Johnson 8bd9000a7d Refs #29501 -- Made dbshell catch more specific FileNotFoundError. 2020-04-14 13:22:47 +02:00