David Smith
70f39e46f8
Refs #30686 -- Fixed text truncation for negative or zero lengths.
2024-02-07 05:18:35 +01:00
nessita
3e820d10f8
Refs #10743 -- Removed leftover comment in tests/admin_changelist/tests.py.
2024-02-06 16:50:54 -03:00
David Smith
48a4693951
Refs #30686 -- Improved test coverage of Truncator.
2024-02-06 16:35:08 +01:00
Adam Johnson
55519d6cf8
Fixed CVE-2024-24680 -- Mitigated potential DoS in intcomma template filter.
...
Thanks Seokchan Yoon for the report.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
Co-authored-by: Shai Berger <shai@platonix.com>
2024-02-06 09:07:31 -03:00
Tom Carrick
9cefdfc43f
Refs #10743 -- Enabled ordering for lookups in ModelAdmin.list_display.
...
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
Co-authored-by: Nina Menezes <https://github.com/nmenezes0 >
2024-02-05 21:42:04 -03:00
Tom Carrick
4ade8386eb
Fixed #10743 -- Allowed lookups for related fields in ModelAdmin.list_display.
...
Co-authored-by: Alex Garcia <me@alexoteiza.com>
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
Co-authored-by: Nina Menezes <https://github.com/nmenezes0 >
2024-02-05 21:42:04 -03:00
Rinat Khabibiev
3580b47ed3
Fixed #27225 -- Added "Age" header when fetching cached responses.
...
Co-Authored-By: Author: Alexander Lazarević <laza@e11bits.com>
2024-02-05 13:27:51 +01:00
Alexander Lazarević
4b1cd8edc1
Corrected cache_page()'s timeout value in tests.generic_views.urls.
2024-02-05 13:27:51 +01:00
Ben Cail
02a600ff67
Fixed #16281 -- Fixed ContentType.get_object_for_this_type() in a multiple database setup.
2024-02-05 08:25:23 +01:00
Simon Charette
e67d7d70fa
Fixed #35149 -- Fixed crashes of db_default with unresolvable output field.
...
Field.db_default accepts either literal Python values or compilables
(as_sql) and wrap the former ones in Value internally.
While 1e38f11
added support for automatic resolving of output fields for
types such as str, int, float, and other unambigous ones it's cannot do
so for all types such as dict or even contrib.postgres and contrib.gis
primitives.
When a literal, non-compilable, value is provided it likely make the
most sense to bind its output field to the field its attached to avoid
forcing the user to provide an explicit `Value(output_field)`.
Thanks David Sanders for the report.
2024-02-04 09:39:41 +01:00
Simon Charette
fe1cb62f5c
Refs #35149 -- Made equivalent db_default alterations noops.
...
This allows for an easier transition of preserving the literal nature of
non-compilable db_default.
2024-02-04 09:31:06 +01:00
Simon Charette
dfc77637ea
Fixed #35162 -- Fixed crash when adding fields with db_default on MySQL.
...
MySQL doesn't allow literal DEFAULT values to be used for BLOB, TEXT,
GEOMETRY or JSON columns and requires expression to be used instead.
Regression in 7414704e88
.
2024-02-03 22:47:40 +01:00
James Thorniley
11393ab131
Fixed #35059 -- Ensured that ASGIHandler always sends the request_finished signal.
...
Prior to this work, when async tasks that process the request are cancelled due
to receiving an early "http.disconnect" ASGI message, the request_finished
signal was not being sent, potentially leading to resource leaks (such as
database connections).
This branch ensures that the request_finished signal is sent even in the case
of early termination of the response.
Regression in 64cea1e48f
.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2024-01-31 14:40:57 -03:00
Natalia
a43d75e81d
Refs #35059 -- Made asgi tests' SignalHandler helper class re-usable by other tests.
2024-01-31 14:39:40 -03:00
Mariusz Felisiak
38eaf2f21a
Fixed #35159 -- Fixed dumpdata crash when base querysets use prefetch_related().
...
Regression in 1391356276
following deprecation in edbf930287
.
Thanks Andrea F for the report.
2024-01-31 16:10:05 +01:00
David Smith
d3922e9e5a
Refs #35058 -- Added support for measured geometries to GDAL Polygon.
2024-01-31 13:11:16 +01:00
Marijke Luttekes
b9e2a3fc63
Fixed #35143 -- Improved accessibility of 404/500 debug pages.
...
This:
- changes the header, main, and footer content areas to be rendered
in a <header>, <main>, and <footer> tags,
- adds scope attributes to <th>,
- uses <code> for a patterns list,
- uses <small> instead of <span>.
2024-01-31 12:26:00 +01:00
Anže Pečar
a0204ac183
Fixed #29280 -- Made the transactions behavior configurable on SQLite.
2024-01-30 11:42:34 +01:00
Nicolas Delaby
820c5f1bac
Fixed #35135 -- Made FilteredRelation raise ValueError on querysets as rhs.
...
Regression in 59f4754704
.
2024-01-29 20:29:49 +01:00
Alexander Lazarević
22785f0d6b
Refs #35141 -- Corrected value of CACHE_MIDDLEWARE_SECONDS in CacheMiddlewareTest tests.
2024-01-29 19:18:43 +01:00
Kris Avi
b7154f811f
Fixed #24128 -- Made admindocs TemplateDetailView respect template_loaders.
...
Co-Authored-By: Author: Alexander Lazarević <laza@e11bits.com>
2024-01-29 10:28:00 +01:00
David Smith
1df8983aa3
Refs #35058 -- Added support for measured geometries to GDAL LineString.
2024-01-29 08:44:42 +01:00
David Smith
2005530920
Refs #35058 -- Made centroid available on all geometry types.
...
Centroid is available on all geometry types since GDAL 1.8.0.
Previously it was restricted to Polygon.
https://gdal.org/doxygen/classOGRGeometry.html#a91787f669b2a148169667e270e7e40df
2024-01-28 14:40:19 +01:00
Mariusz Felisiak
305757aec1
Applied Black's 2024 stable style.
...
https://github.com/psf/black/releases/tag/24.1.0
2024-01-26 12:45:07 +01:00
David Smith
3f6d939c62
Refs #35058 -- Added support for measured geometries to GDAL Point.
...
Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2024-01-25 08:59:16 +01:00
Baptiste Mispelon
a702a0773d
Added test for the sendtestemail command when no recipients are given.
2024-01-24 15:02:42 -03:00
Marijke Luttekes
e412d85b46
Fixed #35115 -- Made admin's footer render in <footer> tag.
2024-01-24 14:11:54 +01:00
David Smith
f4c5973464
Refs #35058 -- Deprecated OGRGeometry.coord_dim setter.
...
Reflecting a change in the underlying GDAL library (since GDAL 2.1)
using coord_dim to set a geometries dimensions is deprecated in favor
of set_3d().
2024-01-23 05:37:59 +01:00
David Smith
1c3a9b9f96
Added more WKT and WKB tests.
2024-01-22 10:40:32 +01:00
Mariusz Felisiak
4879907223
Fixed #35127 -- Made Model.full_clean() ignore GeneratedFields.
...
Thanks Claude Paroz for the report.
Regression in f333e3513e
.
2024-01-19 08:55:50 +01:00
Mariusz Felisiak
51967b56c4
Corrected forms imports in forms_tests/tests/test_forms.py.
2024-01-18 12:20:19 +01:00
David Smith
cfacd69ab8
Refs #35058 -- Added is_3d and set_3d() to OGRGeometry.
2024-01-18 10:48:40 +01:00
Amir Karimi
27a3eee721
Fixed #31700 -- Made makemigrations command display meaningful symbols for each operation.
2024-01-17 14:00:02 +01:00
Alexis Athlani
c7e986fc9f
Fixed #35117 -- Added support for the hectare unit in Area.
2024-01-16 20:31:46 +01:00
Simon Charette
0fcee1676c
Fixed #35111 -- Fixed compilation of DateField __in/__range rhs on SQLite and MySQL.
...
Also removed tests that ensured that adapt_(date)timefield backend
operations where able to deal with expressions when it's not the case
for any other adapt methods.
2024-01-16 08:34:14 +01:00
Simon Charette
561f770415
Refs #22288 -- Corrected __range lookup test names.
2024-01-16 08:34:06 +01:00
Aivars Kalvans
f92641a636
Fixed #28344 -- Allowed customizing queryset in Model.refresh_from_db()/arefresh_from_db().
...
The from_queryset parameter can be used to:
- use a custom Manager
- lock the row until the end of transaction
- select additional related objects
2024-01-15 10:55:14 +01:00
Simon Charette
92d6cff6a2
Fixed #35028 -- Disabled server-side bindings for named cursors on psycopg >= 3.
...
While we provide a `cursor_factory` based on the value of the
`server_side_bindings` option to `psycopg.Connection` it is ignored by
the `cursor` method when `name` is specified for `QuerySet.iterator()`
usage and it causes the usage of `psycopg.ServerCursor` which performs
server-side bindings.
Since the ORM doesn't generates SQL that is suitable for server-side
bindings when dealing with parametrized expressions a specialized cursor
must be used to allow server-side cursors to be used with client-side
bindings.
Thanks Richard Ebeling for the report.
Thanks Florian Apolloner and Daniele Varrazzo for reviews.
2024-01-12 21:40:18 +01:00
nessita
02eaee1209
Added test ensuring that validate_password is used in AdminPasswordChangeForm.
...
Co-authored-by: Fabian Braun <fsbraun@gmx.de>
2024-01-12 17:27:55 -03:00
Florian Apolloner
6e520d9537
Avoided nested transactions in SkippingClassTestCase.
2024-01-12 09:57:52 +01:00
Alexander Lazarević
4787972c94
Refs #28404 -- Made displaying property values in admin respect non-None empty values.
2024-01-11 12:47:06 +01:00
Nick Pope
40b5b1596f
Fixed #35100 -- Reworked GeoIP2 database initialization.
2024-01-11 12:01:35 +01:00
Nick Pope
f50184a84b
Fixed #35092 -- Exposed extra fields for GeoIP2.country() and GeoIP2.city() responses.
2024-01-10 12:09:44 +01:00
Alexander Lazarević
9b02ad91ea
Fixed #28404 -- Made displaying values in admin respect Field's empty_values.
2024-01-10 08:34:25 +01:00
Tim Graham
ecd3071dac
Fixed #35097 -- Tested parse_datetime() with bare date.
...
Regression test for behavior change in
f35ab74752
.
2024-01-09 14:08:03 -03:00
Alexander Lazarević
1b0a8991ae
Refs #28404 -- Split test_null_display_for_field() test.
2024-01-09 11:44:16 +01:00
Sarah Boyce
a9094ec1f4
Fixed #35087 -- Reallowed filtering against foreign keys not listed in ModelAdmin.list_filters.
...
Regression in f80669d2f5
.
2024-01-08 09:21:54 +01:00
Nick Pope
cc56c22a24
Fixed #35091 -- Allowed GeoIP2 querying using IPv4Address/IPv6Address.
2024-01-07 08:15:40 +01:00
David Smith
45f59d0eab
Fixed #35086 -- Added support for BoundedCircle on Spatialite 5.1+.
...
Spatialite 5.1 added support for BoundingCircle
(GEOSMinimumBoundingCircle). GEOS 3.7 is required which is lower than
Django's currently supported minmum of 3.8.
https://groups.google.com/g/spatialite-users/c/hAJ2SgitN4M
https://www.gaia-gis.it/gaia-sins/spatialite-sql-5.1.0.html
2024-01-05 11:55:44 +01:00
Mariusz Felisiak
0c5456ef37
Used enterClassContext() where appropriate.
2024-01-04 05:55:29 +01:00