Marcelo Galigniana
2a2503c2c1
Completed test coverage for django.core.paginator.
2022-10-13 12:27:41 +02:00
Sergio
94e7f471c4
Fixed #34069 -- Made LocaleMiddleware respect language from requests when i18n patterns are used.
2022-10-13 10:38:26 +02:00
Rasmus Magnell
c4aac2ac1e
Fixed #34042 -- Improved accessibility of admin's navigation sidebar.
2022-10-12 10:21:17 +02:00
Marcelo Galigniana
f30c7e381c
Completed test coverage for contenttypes models.
2022-10-11 05:38:39 +02:00
Adam Johnson
6402b064a9
Used test client headers in i18n tests.
2022-10-10 11:46:31 +02:00
Sarah Boyce
84206607d6
Fixed #32833 -- Fixed ContentTypeManager.get_for_models() crash when using in migrations.
...
Co-authored-by: Heraldo Lucena <23155511+HMaker@users.noreply.github.com>
2022-10-10 08:57:52 +02:00
Gregor Gärtner
f0c06f8ab7
Refs #33990 -- Renamed TransactionTestCase.assertQuerysetEqual() to assertQuerySetEqual().
...
Co-Authored-By: Michael Howitz <mh@gocept.com>
2022-10-08 08:07:38 +02:00
Mariusz Felisiak
d795259ea9
Replaced assertQuerysetEqual() to assertSequenceEqual()/assertCountEqual() where appropriate.
...
Follow up to 3f7b327562
.
2022-10-07 13:05:35 +02:00
Gregor Gärtner
564b317fb5
Refs #33990 -- Renamed SimpleTestCase.assertFormsetError() to assertFormSetError().
...
Co-Authored-By: Michael Howitz <mh@gocept.com>
2022-10-07 11:22:16 +02:00
Mariusz Felisiak
749cd83e13
Removed hardcoded pks in TestQuerying.test_group_by_order_by_aliases test.
2022-10-07 08:26:41 +02:00
Shubh1815
7a39a691e1
Fixed #32603 -- Made ModelAdmin.list_editable use transactions.
2022-10-06 20:44:07 +02:00
Simon Charette
c6350d594c
Refs #30158 -- Removed alias argument for Expression.get_group_by_cols().
...
Recent refactors allowed GROUP BY aliasing allowed for aliasing to be
entirely handled by the sql.Query.set_group_by and compiler layers.
2022-10-06 12:04:00 +02:00
Simon Charette
b7b28c7c18
Refs #31150 -- Enabled implicit GROUP BY aliases.
...
This ensures implicit grouping from aggregate function annotations
groups by uncollapsed selected aliases if supported.
The feature is disabled on Oracle because it doesn't support it.
2022-10-06 11:51:32 +02:00
Simon Charette
3d734c09ff
Refs #33992 -- Refactored subquery grouping logic.
...
This required moving the combined queries slicing logic to the compiler
in order to allow Query.exists() to be called at expression resolving
time.
It allowed for Query.exists() to be called at Exists() initialization
time and thus ensured that get_group_by_cols() was operating on the
terminal representation of the query that only has a single column
selected.
2022-10-06 11:38:03 +02:00
Simon Charette
04518e310d
Refs #33308 -- Enabled explicit GROUP BY and ORDER BY aliases.
...
This ensures explicit grouping from using values() before annotating an
aggregate function groups by selected aliases if supported.
The GROUP BY feature is disabled on Oracle because it doesn't support it.
2022-10-06 09:34:31 +02:00
Simon Charette
c58a8acd41
Fixed #33768 -- Fixed ordering compound queries by nulls_first/nulls_last on MySQL.
...
Columns of the left outer most select statement in a combined query
can be referenced by alias just like by index.
This removes combined query ordering by column index and avoids an
unnecessary usage of RawSQL which causes issues for backends that
specialize the treatment of null ordering.
2022-10-05 14:04:49 +02:00
Jack Linke
344d31c7e9
Fixed #34071 -- Improved error message for Range(Min/Max)ValueValidator.
2022-10-05 09:41:01 +02:00
Dhanush
9fbb5b5e16
Fixed #34068 -- Corrected output of runserver command for "0" IP address.
...
Thanks David Sanders for the review.
2022-10-04 10:13:32 +02:00
Adam Johnson
e5ea284294
Fixed CVE-2022-41323 -- Prevented locales being interpreted as regular expressions.
...
Thanks to Benjamin Balder Bach for the report.
2022-10-04 09:10:04 +02:00
David Sanders
4771a1694b
Fixed #34012 -- Made QuerySet.order_by() apply transforms on related fields for models with Meta.ordering.
...
This makes QuerySet.order_by() no longer ignore trailing transforms for
models with Meta.ordering. As a consequence, FieldError is raised in
such cases for non-existent fields.
Thanks to Klaas van Schelven for the report and Mariusz Felisiak for the
review and advice.
2022-10-04 08:19:34 +02:00
Lily Foote
649b28eab6
Fixed #34070 -- Added subsecond support to Now() on SQLite and MySQL.
2022-10-03 12:13:27 +02:00
Mariusz Felisiak
f71b0cf769
Refs #32987 -- Relaxed system check for template tag modules with the same name by turning into a warning.
...
Thanks Claude Paroz for the report.
Regression in 004b4620f6
.
2022-10-03 10:52:21 +02:00
David Wobrock
3b4a5b9f97
Fixed #23353 -- Used "raise from" when raising TransactionManagementError.
...
This change sets the __cause__ attribute to raised exceptions.
2022-10-03 06:08:54 +02:00
Mariusz Felisiak
bc3b8f1524
Refs #34058 -- Fixed changing/deleting sequences when altering pre-Django 4.1 auto fields on PostgreSQL.
...
Thanks Anders Kaseorg for the report.
Follow up to 19e6efa50b
.
Regression in 2eea361eff
.
2022-10-01 07:53:32 +02:00
Mariusz Felisiak
5e0aa362d9
Fixed #33984 -- Reverted "Fixed #32980 -- Made models cache related managers."
...
This reverts 4f8c7fd9d9
and adds
two regression tests:
- test_related_manager_refresh(), and
- test_create_copy_with_m2m().
Thanks joeli for the report.
2022-09-30 18:18:33 +02:00
sarahboyce
6cc0f22a73
Fixed #32095 -- Made QuerySet.update_or_create() save only fields passed in defaults or with custom pre_save().
...
Thanks Florian Apolloner for the initial patch.
2022-09-30 06:26:19 +02:00
Antoine Lorence
9b0c9821ed
Fixed #34062 -- Updated View.http_method_not_allowed() to support async.
...
As with the options() methods, wrap the response in a coroutine if
the view is async.
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2022-09-29 16:28:44 +02:00
Mariusz Felisiak
19e6efa50b
Fixed #34058 -- Changed sequence types when altering pre-Django 4.1 auto fields on PostgreSQL.
...
Thanks Anders Kaseorg for the report.
Thanks Florian Apolloner for pair programming.
Regression in 2eea361eff
.
2022-09-29 13:20:14 +02:00
Adam Johnson
0f5b11eca0
Refs #34010 -- Made --debug-mode work for parallel tests using spawn.
...
Bug in 3b3f38b3b0
.
Thanks Kevin Renskers for the report.
2022-09-28 19:39:25 +02:00
David Sanders
9976f3d4b8
Fixed #34025 -- Fixed selecting ModelAdmin.autocomplete_fields after adding/changing related instances via popups.
...
Regression in c72f6f36c1
.
Thanks Alexandre da Silva for the report.
2022-09-28 11:28:01 +02:00
Mariusz Felisiak
6e891a1722
Removed obsolete test_skip_link_is_skipped_when_there_is_searchbar test.
...
searchbar doesn't have autofocus since
d938b3b257
.
2022-09-28 11:27:11 +02:00
Jacob Walls
80d38de52b
Fixed #34051 -- Made makemigrations --check exit before making migrations.
2022-09-28 09:48:07 +02:00
JunKi Yoon
1a7b6909ac
Fixed #34052 -- Made migrate --check don't emit signals and output when up to date.
2022-09-27 21:10:30 +02:00
David Wobrock
cff1f888e9
Fixed #33464 -- Resolved output_field for combined numeric expressions with MOD operator.
2022-09-27 20:41:10 +02:00
sarahboyce
ae3d575ec3
Added tests for QuerySet.update_or_create() with multi-table inheritance.
2022-09-27 12:55:33 +02:00
Marcelo Galigniana
67c34c1a37
Completed test coverage for createsuperuser command.
2022-09-27 09:57:16 +02:00
Adam Johnson
cd03e8e2d6
Fixed #34050 -- Replaced invalid chars in migration names with '_'.
...
Thanks to Bishal Gautam for the report and initial implementation.
Regression in fa58450a9a
.
Co-Authored-By: Bishal Gautam <bisalgt@gmail.com>
2022-09-27 08:02:51 +02:00
Moshe Nahmias
d938b3b257
Fixed #34040 -- Removed autofocus from admin search box.
2022-09-26 21:06:48 +02:00
Mariusz Felisiak
f4e592e383
Removed unnecessary MySQL workaround in timezones tests.
...
Unnecessary since 22da5f8817
.
2022-09-26 13:36:47 +02:00
Florian Perucki
872b61193b
Refs #34041 -- Added navigation landmark to breadcrumbs in admin.
...
Thanks Thibaud Colas for pair programming.
2022-09-26 08:51:15 +02:00
David Sanders
9f8c994851
Fixed #34027 -- Fixed migrations crash when altering type of char/text fields referenced by foreign key on PostgreSQL.
2022-09-25 20:23:01 +02:00
select-case
f3822d4ab0
Fixed #34026 -- Fixed WKBReader.read() crash on string input.
2022-09-24 17:16:08 +01:00
David Sanders
1674c70525
Fixed #34024 -- Fixed crash when aggregating querysets with Q objects annotations.
...
This reverts b64db05b9c
.
It was reasonable to assume it was unnecessary code as there were
no failing tests upon its removal. This commit adds the necessary
regression tests for the failing condition identified in #34024
alongside the original tests added in the PR for which
WhereNode.is_summary was introduced.
2022-09-23 15:15:03 +01:00
Mariusz Felisiak
37a13cc92d
Refs #34012 -- Added test for ordering by transform of related fields.
2022-09-22 12:55:47 +02:00
Mariusz Felisiak
ce6230aa97
Fixed #34015 -- Allowed filtering by transforms on relation fields.
2022-09-22 00:17:04 +02:00
Alexander Kerkum
f88fc72da4
Fixed #34016 -- Fixed QuerySet.values()/values_list() crash on ArrayAgg() and JSONBAgg().
...
Regression in e06dc4571e
.
2022-09-17 19:38:20 +02:00
Kamil Turek
ae509f8f08
Fixed #34014 -- Fixed DecimalValidator validating 0 in positive exponent scientific notation.
...
Thanks Shiplu Mokaddim for the report.
2022-09-17 10:02:55 +02:00
Mariusz Felisiak
229360d7ad
Fixed test_relational_post_delete_signals_happen_before_parent_object when run in isolation.
2022-09-16 11:14:27 +02:00
Allen Jonathan David
10178197d5
Fixed #33966 -- Added support for using KeyTextTransform from lookup.
2022-09-16 05:36:57 +02:00
Anvesh Mishra
6220c445c4
Fixed #29186 -- Fixed pickling HttpRequest and subclasses.
2022-09-14 13:04:34 +02:00