Carlton Gibson
fde946daff
Refs #32339 -- Restructured outputting HTML form docs.
...
In the topic doc, promoted the Reusable form templates section.
In the reference, re-grouped and promoted the default __str__()
rendering path, and then gathered the various as_*() helpers
subsequently.
Thanks to David Smith for review.
2022-05-04 11:52:48 +02:00
Gagaro
5d91dc8ee3
Refs #30581 -- Added Q.check() hook.
2022-05-04 08:47:52 +02:00
Simon Charette
1109e66990
Refs #33646 -- Reduced sync_to_async hops on async QuerySet iteration.
...
Until we add support for truly asynchronous database backends it's
actually detrimental to have complete set retrieval require multiple
hops between sync and async emulated contexts via asgiref.
By defaulting to sending the whole sync _fetch_all() to the current
context thread pool we reduce unncessary work when dealing with large
result sets since the queryset cannot be iterated anyway before all
results are retrieved and cached.
2022-05-04 08:31:59 +02:00
Mariusz Felisiak
37470bbd90
Fixed #33675 -- Dropped support for PostgreSQL 10 and PostGIS 2.4.
2022-05-04 06:28:51 +02:00
Gagaro
9d04711261
Refs #30581 -- Added Q.flatten().
2022-05-03 15:31:53 +02:00
Alokik Vijay
df22566748
Fixed #33658 -- Doc'd ModelChoiceField.blank attribute.
...
Thanks Mariusz Felisiak for reviewing.
2022-05-03 14:23:00 +02:00
Mariusz Felisiak
aa8b9279e4
Fixed CoveringIndexTests.test_covering_partial_index() when DEFAULT_INDEX_TABLESPACE is set.
2022-05-03 14:22:34 +02:00
Collin Anderson
3b898ea61e
Fixed #29854 -- Made _all_related_fields() return deterministically ordered fields.
...
Thanks to Rick Yang and Baptiste Mispelon for the investigation.
2022-05-03 10:01:45 +02:00
Carlton Gibson
c5fd5e3cc3
Updated release date for Django 4.0.5.
2022-05-03 09:18:42 +02:00
Hrushikesh Vaidya
f74d4cae6d
Fixed #33667 -- Used --header-branding-color for branding headers in admin.
2022-05-03 08:29:51 +02:00
Mariusz Felisiak
271a8e73ee
Refs #33646 -- Made QuerySet.raw() async-compatible.
2022-05-02 10:52:33 +02:00
Mariusz Felisiak
77926176b2
Refs #33646 -- Added RawModelIterable.
2022-05-02 10:52:33 +02:00
David Wobrock
aca9bb2a12
Fixed #33413 -- Made migrations propage collations to related fields.
2022-05-02 08:13:38 +02:00
Tim Graham
694cf458f1
Removed 'tests' path prefix in a couple tests.
2022-05-02 06:21:18 +02:00
Mariusz Felisiak
1b3a949ba2
Refs #33671 -- Fixed migrations crash when adding collation to a primary key on Oracle.
2022-04-29 21:43:55 +02:00
Clemens Wolff
f0ba799edf
Refs #30426 -- Updated XFrameOptionsMiddleware docstring.
...
Follow up to 05d0eca635
.
2022-04-29 21:17:27 +02:00
Mariusz Felisiak
b34238addc
Fixed #33670 -- Fixed altering primary key on SQLite.
2022-04-29 20:16:34 +02:00
Steven DeMartini
562e3bc09a
Refs #23435 -- Added note about GenericForeignKey indexes to docs.
2022-04-29 07:48:37 +02:00
David Wobrock
87da283338
Refs #33413 -- Added collation to CharField/TextField's db_parameters.
2022-04-29 06:30:15 +02:00
mpachas
aa28c392b9
Fixed #33661 -- Corrected Catalan date-format localization.
...
Changed DATE_FORMAT, DATETIME_FORMAT and MONTH_DAY_FORMAT
to use E placeholder (Month, locale specific alternative)
to handle both “de gener” and contracted “d’abril” cases.
Thanks to Ferran Jovell for review.
2022-04-28 15:12:15 +02:00
David
ce586ed693
Removed hyphen from pre-/re- prefixes.
...
"prepopulate", "preload", and "preprocessing" are already in the
spelling_wordlist.
This also removes hyphen from double "e" combinations with "pre" and
"re", e.g. preexisting, preempt, reestablish, or reenter.
See also:
- https://ahdictionary.com/word/search.html?q=rerun
- https://ahdictionary.com/word/search.html?q=recreate
- https://ahdictionary.com/word/search.html?q=predetermined
- https://ahdictionary.com/word/search.html?q=reuse
- https://ahdictionary.com/word/search.html?q=reopening
2022-04-28 10:44:14 +02:00
David
33e89de8ca
Changed "stdlib" to "Standard Library" in docs/releases/1.9.txt.
2022-04-28 10:44:14 +02:00
David
2ed6f20e7a
Added links to Solr and Haystack in docs.
2022-04-28 10:44:14 +02:00
David
51874dd160
Added backticks to code literals in various docs.
2022-04-28 10:44:14 +02:00
David
15b888bb83
Changed "refactorings" to "refactoring" in docs/releases/1.0.txt.
2022-04-28 10:44:09 +02:00
David
1c2bf80acb
Changed "ie." to "i.e." in docs.
2022-04-28 10:37:06 +02:00
Carlton Gibson
476d4d5087
Refs #32339 -- Allowed renderer to specify default form and formset templates.
...
Co-authored-by: David Smith <smithdc@gmail.com>
2022-04-27 10:21:04 +02:00
Carlton Gibson
832096478c
Refs #32339 -- Added base form renderer to docs.
2022-04-27 10:21:04 +02:00
Andrew Godwin
58b27e0dbb
Fixed #33646 -- Added async-compatible interface to QuerySet.
...
Thanks Simon Charette for reviews.
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2022-04-26 20:25:23 +02:00
Marcelo Galigniana
27aa7035f5
Fixed #27471 -- Made admin's filter choices collapsable.
2022-04-26 08:44:31 +02:00
L
37602e4948
Fixed #33656 -- Fixed MultiWidget crash when compressed value is a tuple.
2022-04-26 07:06:26 +02:00
marcperrinoptel
4282fd468f
Fixed #33655 -- Removed unnecessary constant from GROUP BY clause for QuerySet.exists().
2022-04-26 06:19:18 +02:00
siddhartha-star-dev
dcebc5da48
Refs #2259 -- Disallowed primary keys in ModelAdmin.list_editable.
...
Refs #32728 .
2022-04-25 11:00:50 +02:00
Hannes Ljungberg
ed0a2c3238
Removed unnecessary variable in Index.create_sql().
...
Unnecessary since fdfb3086fc
.
2022-04-22 19:07:56 +02:00
Collin Anderson
0de89b6f8d
Refs #31223 -- Added __class_getitem__() to ForeignKey.
2022-04-22 14:13:12 +02:00
Mariusz Felisiak
eeb0bb6379
Refs #27674 --- Deprecated django.contrib.gis.admin.OpenLayersWidget.
2022-04-22 11:36:27 +02:00
Adam Johnson
6f453cd298
Fixed #33509 -- Added "(no-op)" to sqlmigrate output for operations without SQL statement.
2022-04-21 12:25:16 +02:00
Adam Johnson
f15f7d395c
Refs #33509 -- Made sqlmigrate tests stricter and improved isolation.
2022-04-21 12:21:46 +02:00
sarahboyce
cd4da34fc1
Fixed #33004 -- Made saving objects with unsaved GenericForeignKey raise ValueError.
...
This aligns to the behaviour of OneToOneField and ForeignKey fields.
Thanks Jonny Park for the initial patch.
2022-04-21 10:12:28 +02:00
Mariusz Felisiak
1ed8ca43f6
Refs #13085 -- Removed unnecessary ManyToManyFields from generic_relations_regress test models.
2022-04-21 09:59:09 +02:00
Hannes Ljungberg
6f311c7e35
Refs #33508 -- Corrected note about MySQL/MariaDB support of index ordering.
2022-04-20 17:45:23 +02:00
Carlton Gibson
6b53114dd8
Refs #33646 -- Added example for async cross-thread connection access.
2022-04-20 14:07:14 +02:00
Aymeric Augustin
5dfa6fca96
Refactored out RedirectURLMixin.get_success_url().
...
This also adds a default implementation of get_default_redirect_url().
2022-04-20 10:04:29 +02:00
Aymeric Augustin
04bc2564b6
Simplified LogoutView.get_success_url().
...
This preserves the behavior of redirecting to the logout URL without
query string parameters when an insecure ?next=... parameter is given.
It changes the behavior of a POST to the logout URL, as shown by the
test that is changed. Currently, this results in a GET to the logout
URL. However, such GET requests are deprecated. This change would be
necessary in Django 5.0 anyway. This commit merely anticipates it.
2022-04-20 10:04:29 +02:00
Aymeric Augustin
5fcd9b8c33
Unified LoginView/LogoutView.get_default_redirect_url() methods.
...
This might change the behavior when self.next_page == "". However,
resolve_url(self.next_page) would almost certainly fail in that case.
It is technically possible to define a logout URLpattern whose name is
"": path('logout/', LogoutView.as_view(), name=''), and then to refer to
this pattern with next_page = "". However this feels like a pathological
case, so we decided not to handle it.
Most checks on next_page, LOGIN_REDIRECT_URL, and LOGOUT_REDIRECT_URL
are performed with boolean evaluation rather than comparison with None.
That's why we standardizing that way.
2022-04-20 10:04:29 +02:00
Aymeric Augustin
5b8699e723
Renamed LogoutView.get_next_page() to get_success_url().
...
This aligns it with LoginView. Also, it removes confusion with the
get_next_page() method of paginators. get_next_page() was a private
API, therefore this refactoring is allowed.
2022-04-20 10:04:29 +02:00
Aymeric Augustin
12576bd371
Refactored out RedirectURLMixin.get_redirect_url().
...
This also renames SuccessURLAllowedHostsMixin to RedirectURLMixin.
This doesn't change the behavior of LogoutView.get_next_page() because
next_page == "" implies url_is_safe == False before the refactoring.
2022-04-20 10:04:29 +02:00
Andrey Otto
420d13edee
Fixed #33654 -- Added localdate to utils.timezone.__all__.
2022-04-20 09:59:48 +02:00
Xiang Zhang
c8c6a51a38
Added TiDB to list of third-party DB backends.
2022-04-20 08:11:17 +02:00
Theofilos Alexiou
470708f50d
Updated note about ListView pagination example in CBV docs.
...
Follow up to 0f0abc20be
.
2022-04-19 21:38:49 +02:00