Nick Pope
7f33c1e22d
Added note about zero timeout in cache settings docs.
2021-07-14 20:28:21 +02:00
ᴙɘɘᴙgYmɘᴙɘj
5838102ae6
Fixed typo in docs/internals/contributing/committing-code.txt.
2021-07-14 20:21:26 +02:00
Carlton Gibson
3a45fea083
Fixed #21936 -- Allowed DeleteView to work with custom Forms and SuccessMessageMixin.
...
Thanks to Mariusz Felisiak for review.
Co-authored-by: Demetris Stavrou <demestav@gmail.com>
Co-authored-by: Caroline Simpson <github@hoojiboo.com>
2021-07-14 09:47:03 +02:00
Mariusz Felisiak
37e8367c35
Refs #31676 -- Removed Django Core-Mentorship mailing list references in docs.
2021-07-13 20:21:22 +02:00
Nick Pope
1f4908b01a
Simplified django.utils.dateformat methods.
...
This removes unnecessary format('O') call, remove unnecessary method
calls for simple cases in TimeFormat, and simplifies time zone handling
in TimeFormat.
2021-07-13 13:27:01 +02:00
Nick Pope
6afc2a944c
Completed test coverage for django.utils.dateformat.
2021-07-13 13:21:10 +02:00
Nick Pope
ab0d751ddf
Used subTest() in utils_tests.test_dateformat.
2021-07-13 13:06:48 +02:00
Hasan Ramezani
f5669fd7b5
Fixed #32899 -- Added note about avoiding non-dict objects in JsonResponse docs.
...
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-07-13 10:25:03 +02:00
Daniele Procida
22fbebc744
Refs #32880 -- Made some titles consistent in how-to documents.
...
This retitles documents for consistency, since some already (correctly)
begin "How to...".
2021-07-13 09:25:37 +02:00
Chris Jerdonek
4be58fcc36
Fixed #32917 -- Added BaseForm._widget_data_value()/_field_data_value().
2021-07-13 06:32:46 +02:00
Wilhelm Klopp
bbf93efa19
Refs #23359 -- Corrected showmigrations help text for the --database option.
2021-07-13 06:29:21 +02:00
Mariusz Felisiak
0250340e37
Refs #32074 -- Used Enum.repr() format proposed for Python 3.10.
...
The Python's Steering Council decided to revert changes in the Enum
module (see https://bugs.python.org/issue44559 ) and moved them to
Python 3.11.
Follow up to 5d9b065d3f
.
Thanks Nick Pope for the review.
2021-07-12 11:46:37 +02:00
Daniele Procida
013a1824d3
Refs #32880 -- Created a new logging how-to document.
...
Moved how-to material from topic document into a new document, and
added new material. Introduced minor improvements to logging
reference document.
2021-07-12 09:04:25 +02:00
Chris Jerdonek
5848b3a1d7
Fixed #32914 -- Prevented test --shuffle from skipping test methods.
...
"test --shuffle" skipped test methods when test classes were mixed.
This changes runner.py's reorder_tests() to group by TestCase class.
Regression in 90ba716bf0
.
2021-07-12 06:36:12 +02:00
Wille Marcel
6f60fa97b0
Fixed typo in docs/ref/contrib/gis/tutorial.txt.
2021-07-09 20:17:16 +02:00
Ian Foote
f42ccdd835
Fixed #27021 -- Allowed lookup expressions in annotations, aggregations, and QuerySet.filter().
...
Thanks Hannes Ljungberg and Simon Charette for reviews.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-07-09 11:43:06 +02:00
Chris Jerdonek
f5dccbafb9
Refs #24522 -- Fixed code comment about seeds in Shuffler.__init__().
2021-07-09 08:20:16 +02:00
Mariusz Felisiak
ae32e337e0
Fixed isolation of NonAutocommitTests.test_orm_query_after_error_and_rollback().
2021-07-09 07:38:31 +02:00
Mariusz Felisiak
7bb0605a8c
Fixed isolation of GenericRelationTests.test_filter_targets_related_pk().
2021-07-08 13:13:40 +02:00
Chris Jerdonek
90ba716bf0
Fixed #24522 -- Added a --shuffle option to DiscoverRunner.
2021-07-08 07:29:04 +02:00
Mariusz Felisiak
77b88fe621
Fixed #32908 -- Allowed select_for_update(skip_locked) on MariaDB 10.6+.
2021-07-08 06:51:10 +02:00
Keryn Knight
5013798fe9
Fixed #32840 -- Optimized Field.get_col().
...
get_col() used "self" as "output_field" when it was not given, and
unnecessarily compared "self" to "self".
Co-authored-by: Chris Jerdonek <chris.jerdonek@gmail.com>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-07-07 20:32:57 +02:00
Mariusz Felisiak
355ecd1416
Fixed inspectdb and schema tests on MariaDB 10.6+.
...
The utf8 character set (and related collations) is by default an alias
for utf8mb3 on MariaDB 10.6+.
2021-07-07 17:02:20 +02:00
abhiabhi94
cf6774a53b
Fixed #32904 -- Made parse_time() more strict.
...
Thanks Keryn Knight for the report.
2021-07-07 12:08:43 +02:00
Shipeng Feng
68cc04887b
Fixed #32866 -- Fixed trimming trailing punctuation from escaped string in urlize().
2021-07-07 11:19:33 +02:00
Mads Jensen
c51bf80d56
Used more specific unittest assertions in tests.
2021-07-07 10:51:38 +02:00
Claude Paroz
7309393c3a
Documented in_bulk behavior with nonexistent id_list items.
...
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
2021-07-07 10:13:32 +02:00
abhiabhi94
6a5ef557f8
Added test for errors when saving timezone-aware times if not supported.
2021-07-06 10:44:06 +02:00
Keryn Knight
f35ab74752
Fixed #32892 -- Optimized django.utils.dateparse functions by using fromisoformat().
2021-07-06 08:57:17 +02:00
Keryn Knight
857320e9e0
Added more tests for parse_time().
2021-07-06 08:45:23 +02:00
Adam Johnson
14518ccf75
Bumped versions in pre-commit configuration.
2021-07-06 08:19:46 +02:00
Hannes Ljungberg
a06b977a91
Fixed #32776 -- Added support for Array subqueries on PostgreSQL.
2021-07-06 07:36:52 +02:00
Mariusz Felisiak
49ca6bbc44
Fixed isolation of RouterTestCase.test_m2m_cross_database_protection().
...
Hardcoded pks are necessary for this test case, however we need to set
them for all new rows because the sequence will not increment
automatically. It works when the sequence is incremented by other
test cases.
2021-07-05 15:22:08 +02:00
Chris Jerdonek
edde2a0699
Fixed #32901 -- Optimized BaseForm.__getitem__().
2021-07-05 15:21:23 +02:00
Mateo Radman
2231429991
Refs #32508 -- Raised ImproperlyConfigured/TypeError instead of using "assert".
2021-07-05 13:31:03 +02:00
Mariusz Felisiak
1ff0ea6e9b
Fixed isolation of test_filename_traversal_upload().
...
shutil.rmtree(MEDIA_ROOT) is already called as a class cleanup.
2021-07-05 12:05:13 +02:00
Wu Haotian
aba9c2de66
Fixed #32226 -- Fixed JSON format of QuerySet.explain() on PostgreSQL.
2021-07-05 09:08:39 +02:00
Wu Haotian
b3b04ad211
Refs #28574 -- Added test for XML format output to Queryset.explain().
2021-07-05 09:01:54 +02:00
Eduardo Aldair Ahumada Garcia Jurado
e4da365436
Refs #24121 -- Added __repr__() to AdminSite, DefaultAdminSite, and ModelAdmin.
...
Thanks tlebrize for the initial patch.
2021-07-05 08:15:58 +02:00
Nick Pope
fa35c8bdbc
Fixed #30934 -- Included database alias in django.db.backends log messages.
...
This is useful when working with database routing as you want to know
where each query is being executed.
Co-authored-by: David Winterbottom <david.winterbottom@gmail.com>
2021-07-02 15:36:53 +02:00
cammil
313c3d1aa1
Fixed #28935 -- Fixed display of errors in extended blocks.
...
Get the template that caused the exception and get the
exception info from that template, using the node that
caused the exception.
2021-07-02 11:38:15 +02:00
Simon Charette
9f3cce172f
Refs #26430 -- Re-introduced empty aggregation optimization.
...
The introduction of the Expression.empty_aggregate_value interface
allows the compilation stage to enable the EmptyResultSet optimization
if all the aggregates expressions implement it.
This also removes unnecessary RegrCount/Count.convert_value() methods.
Disabling the empty result set aggregation optimization when it wasn't
appropriate prevented None returned for a Count aggregation value.
Thanks Nick Pope for the review.
2021-07-02 07:25:42 +02:00
Simon Charette
f3112fde98
Fixed #26430 -- Fixed coalesced aggregation of empty result sets.
...
Disable the EmptyResultSet optimization when performing aggregation as
it might interfere with coalescence.
2021-07-02 06:40:54 +02:00
abhiabhi94
fde6fb2898
Fixed #32893 -- Fixed serialization of models.Model class in migrations.
...
Migrations assumed that an import of the models.Model class must
already be included when it's serialized, but for models with only
custom fields this was not necessarily the case.
Thanks Jaap Joris Vens for the report.
2021-07-01 12:42:32 +02:00
Allan Feldman
36fa071d6e
Fixed #32889 -- Allowed per-request sync_to_async context in ASGIHandler .
...
By using a asgiref's ThreadSensitiveContext context manager, requests
will be able to execute independently of other requests when sync work
is involved.
Prior to this commit, a single global thread was used to execute any
sync work independent of the request from which that work was scheduled.
This could result in contention for the global sync thread in the case
of a slow sync function.
Requests are now isolated to their own sync thread.
2021-07-01 12:13:19 +02:00
Carlton Gibson
4af162d4de
Refs #32144 -- Made makemessages remove temporary files on preprocessing error.
...
Co-authored-by: Anders Hovmöller <anders.hovmoller@dryft.se>
2021-07-01 10:11:10 +02:00
Carlton Gibson
dfa7781033
Fixed #32144 -- Made makemessages remove temporary files when locale path doesn't exist.
2021-07-01 10:11:10 +02:00
Mariusz Felisiak
8feb2a49fa
Added CVE-2021-35042 to security archive.
2021-07-01 09:57:08 +02:00
Mariusz Felisiak
bcea1a3193
Added stub release notes for Django 3.2.6.
2021-07-01 09:43:15 +02:00
Mariusz Felisiak
dae83a2451
Forwardported release notes for CVE-2021-35042.
2021-07-01 09:42:54 +02:00