Commit Graph

29900 Commits

Author SHA1 Message Date
Chris Jerdonek b2be7e12cc Refs #33002 -- Made template_tests.tests.py's tests test both Lexer and DebugLexer. 2021-08-09 13:37:02 +02:00
Keryn Knight 921e4ccb77
Fixed #33003 -- Removed **kwargs from QuerySet._chain().
The functionality of updating the __dict__ was only present to allow
for pickling a Prefetch object, which is a comparably rare operation.
Forcing the __getstate__() implementation to handle it allows the
chaining operation to be slightly faster, which is much more common.
2021-08-09 13:28:40 +02:00
Premkumar Chalmeti fffeb5df55
Removed redundant definition of UserModel in ModelBackend.with_perm(). 2021-08-09 10:36:55 +02:00
Greg Twohig fc2bd40fc7 Fixed #32990 -- Simplified and optimized tag regex.
Thanks Chris Jerdonek for the review.
2021-08-09 08:21:43 +02:00
Greg Twohig c99aaf14ee Refs #32990 -- Added tests for DebugLexer/Lexer.tokenize(). 2021-08-09 08:21:37 +02:00
Jacob Walls 259b28706e
Fixed some broken links and redirects in docs. 2021-08-09 07:07:52 +02:00
David Smith 8208381ba6 Refs #32956 -- Corrected spelling of daylight saving time.
AP Stylebook: Saving not savings, no hyphen, and lowercase.
2021-08-06 13:00:24 +02:00
qimingmafan ee46722cb9 Fixed typo in regex for IPv6 literals in EmailValidator. 2021-08-06 12:58:55 +02:00
Mariusz Felisiak 61d92c650f Refs #22123 -- Added more URLValidator test for invalid IPv6 literals. 2021-08-06 12:58:55 +02:00
Nick Touran 5d4f21b16f Fixed #32983 -- Added system check for redundant related_name on symmetrical M2M fields.
Since ManyToManyFields defined with `symmetrical=True` do not add a
related field to the target model, including a `related_name` argument
will never do what the coder likely expects. This makes including
a related_name with a symmetrical model raise a system check warning.

ticket-32983
2021-08-06 11:57:02 +02:00
Nick Touran 1fb21ab377 Refs #32983 -- Removed unneeded related_name from test model definitions. 2021-08-06 11:57:02 +02:00
Jarosław Wygoda d3c4696596 Fixed #27590 -- Allowed customizing a manifest file storage in ManifestFilesMixin. 2021-08-05 12:40:34 +02:00
Chris Jerdonek 4fe3774c72 Refs #32986 -- Moved TRANSLATOR_COMMENT_MARK to django.utils.translation.template. 2021-08-05 06:11:40 +02:00
Chris Jerdonek e79ae5c317 Fixed #32986 -- Removed unneeded str.find() call in Lexer.create_token().
Unnecessary since 47ddd6a408.
2021-08-05 05:57:36 +02:00
Mariusz Felisiak ab16507f19
Fixed #32988 -- Prevented creation of more test databases than TestCases.
DiscoverRunner.parallel is used in setup_databases() and
teardown_databases() to control the number of test databases.

Regression in cb6c19749d.
2021-08-05 05:55:35 +02:00
Jacob Walls 2d0ae8da80 Fixed #29205 -- Corrected rendering of required attributes for MultiValueField subfields. 2021-08-04 17:37:04 +02:00
Jacob Rief db1fc5cd3c Fixed #32855 -- Corrected BoundWidget.id_for_label() with custom auto_id. 2021-08-04 15:18:00 +02:00
Jacob Walls 910ecd1b8d Fixed #29063 -- Fixed migrate crash when specifying a name of partially applied squashed migrations. 2021-08-04 09:57:32 +02:00
Jacob Walls 202d3e193a Fixed typos in migrations tests, comments, and error message. 2021-08-04 09:28:23 +02:00
Mariusz Felisiak 52f9cfee9f Used assertRaisesMessage() to test MigrationLoader.get_migration_by_prefix()'s error messages. 2021-08-04 09:20:26 +02:00
Michał Górny 7afca03c40 Refs #32074 -- Fixed CommandTests.test_subparser_invalid_option on Python 3.10+.
Python 3.10.0rc1 changed the error messages issued by argparse on
invalid choice to include the argument name. Update the expected test
output to account for that.
2021-08-04 07:59:08 +02:00
Ties Jan Hefting 4f3acf9579 Fixed #32984 -- Allowed customizing a deletion field widget in formsets. 2021-08-03 13:12:50 +02:00
Ties Jan Hefting 47cb85b542 Fixed typos in tests/forms_tests/tests/test_formsets.py. 2021-08-03 12:53:45 +02:00
Adam Johnson ae89daf46f Fixed #31621 -- Added support for '--parallel auto' to test management command. 2021-08-03 09:57:04 +02:00
Adam Johnson 7e38a8d66f Refs #31621 -- Added more tests for test --parallel option. 2021-08-03 09:57:04 +02:00
Chris Jerdonek 795051b2b0 Refs #32800 -- Added tests of more CSRF functions. 2021-08-03 07:16:31 +02:00
Chris Jerdonek 7132341255 Refs #32800 -- Renamed _compare_masked_tokens() to _does_token_match(). 2021-08-03 07:10:31 +02:00
Lauri Tirkkonen 4b6208ffdd Updated BaseDatabaseFeatures link in testing tools docs. 2021-08-02 12:48:20 +02:00
Keryn Knight edf184dd06 Fixed #32919 -- Optimized lexing & parsing of templates.
This optimizes:
- Lexer.create_token() by avoiding startswith() calls,
- Parser.parse() by re-using the token type enum's value,
- Parser.extend_nodelist() by removing unnecessary isinstance() check,
- some Node subclasses by removing the implicit "nodelist" from
  "child_nodelists",
- Variable.__init__() by avoiding startswith() calls.
2021-08-02 10:57:51 +01:00
Mariusz Felisiak 34d5336b9d Added test for TemplateSyntaxError when variables begin with underscores. 2021-08-02 11:37:39 +02:00
Illia Volochii f03ba0ad52
Simplified serializing HTTP response headers.
Since ResponseHeaders was introduced, header names and values are stored
as strings. There is no need to check whether they are bytes.

Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2021-08-02 09:24:48 +02:00
Carlton Gibson 947bdec60c Added stub release notes for Django 3.2.7. 2021-08-02 08:41:29 +02:00
ilu_vatar_ 4114531cb7
Clarified URL patterns in tutorial 3.
Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2021-08-02 08:00:43 +02:00
David Smith f9b7704ab3
Refs #32956 -- Corrected spelling of "gray". 2021-08-02 07:51:24 +02:00
David Smith 6802ac4415
Refs #32956 -- Corrected usage of "insure" and "assure". 2021-08-02 07:45:26 +02:00
Carlton Gibson 74a86e9b5e Confirmed release date for Django 3.2.6. 2021-08-02 06:55:40 +02:00
David Smith fbb1984046
Refs #32956 -- Updated words ending in -wards.
AP styleguide: Virtually none of the words ending with -wards end with
an s.
2021-07-30 20:34:50 +02:00
Mariusz Felisiak f2ed2211c2 Refs #31676 -- Updated technical board description in organization docs.
According to DEP 0010.
2021-07-30 11:02:48 +02:00
Mariusz Felisiak 228ec8e015 Refs #31676 -- Added Mergers and Releasers to organization docs.
According to DEP 0010.
2021-07-30 11:02:44 +02:00
Mariusz Felisiak caa2dd08c4 Refs #31676 -- Removed Core team from organization docs.
According to DEP 0010.
2021-07-30 10:52:43 +02:00
Chris Jerdonek 6f5e07a84d Refs #32966 -- Refactored out DateTimeCheckMixin._check_if_value_fixed(). 2021-07-30 10:15:43 +02:00
Chris Jerdonek 6fa5d05dba Refs #32966 -- Simplified the _check_fix_default_value() implementations. 2021-07-30 09:31:29 +02:00
Chris Jerdonek eebebfe0a9 Refs #32966 -- Added _to_naive() and _get_naive_now() for use in DateTimeCheckMixin classes. 2021-07-30 09:31:24 +02:00
Chris Jerdonek 542e749475 Fixed #32966 -- Fixed TimeField.check() crash for timezone-aware times in default when USE_TZ = True. 2021-07-30 09:15:39 +02:00
David Smith 40d3cec22d
Removed unused and unnecessary words from docs/spelling_wordlist.
This removes unused words and words contained within the Enchant
dictionary.
2021-07-30 06:53:00 +02:00
Mariusz Felisiak f331eba6d5
Refs #32880 -- Made remaining titles consistent in how-to documents.
Follow up to 22fbebc744.
2021-07-29 19:11:42 +02:00
Chris Jerdonek 7c30bdbdb1 Refs #32916 -- Replaced request.csrf_cookie_needs_reset with request.META['CSRF_COOKIE_NEEDS_UPDATE']. 2021-07-29 11:55:36 +02:00
Chris Jerdonek 6ebf931de8 Fixed #32916 -- Combined request.META['CSRF_COOKIE_USED'] and request.csrf_cookie_needs_reset. 2021-07-29 11:55:36 +02:00
Mariusz Felisiak 01eed04155
Used Ubuntu 18.04 for docs GitHub action. 2021-07-29 11:54:14 +02:00
Jonathan Davis 4c6a6d5ac7
Fixed #23895 -- Prevented pickling of ResolverMatch.
Pickling a ResolverMatch did not work correctly in many cases,
especially with CBVs and URLResolvers in the list of tried URL paths.
2021-07-29 07:04:56 +02:00