0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00
Commit Graph

30333 Commits

Author SHA1 Message Date
mendespedro
75485d16a2 Fixed #33351 -- Made path()/re_path() raise TypeError when kwargs argument is not a dict. 2021-12-13 08:09:28 +01:00
Beomsoo Kim
7e4a9a9f69
Corrected example in models.DecimalField docs. 2021-12-13 07:20:35 +01:00
Wayne Lambert
8a8c8797e8
Updated link to Microsoft SQL Server backend. 2021-12-13 07:17:05 +01:00
Mariusz Felisiak
2f73e5406d Refs #32502 -- Avoided table rebuild when adding fields with no default on SQLite. 2021-12-10 17:13:05 +01:00
Mariusz Felisiak
57f0638573 Fixed DatabaseFeatures.requires_literal_defaults on SQLite.
This flag is currently unused on SQLite because it doesn't support
dropping a DEFAULT clause, however it requires literal defaults, rather
than parameterized ones, so we can set it for clarity.
2021-12-10 12:06:46 +01:00
Mariusz Felisiak
4e249d11a6
Refs #32502 -- Added SchemaEditor.prepare_default() on SQLite. 2021-12-10 12:05:58 +01:00
Adam Johnson
702c314c57 Moved ManagementForm's fields to class attributes.
This helps introspection, and it follows the comment in
BaseForm.__init__() to avoid changing base_fields.

Thanks to Silvio Gutierrez and Baptiste Mispelon for investigating.
2021-12-10 10:04:28 +01:00
Adam Johnson
0d2435328a Added test for field names of ManagementForm. 2021-12-10 10:01:33 +01:00
Adam Johnson
1be99e4e0a
Corrected return value of ForeignKey.db_check().
Field.db_check() should return None or a SQL string.
Returning [] happened to work because it’s falsey.
2021-12-10 09:22:09 +01:00
Mariusz Felisiak
974e3b8750
Fixed inspectdb.tests.InspectDBTestCase.test_custom_fields() on SQLite 3.37+.
Use FlexibleFieldLookupDict which is case-insensitive mapping because
SQLite 3.37+ returns some data type names upper-cased e.g. TEXT.
2021-12-09 20:24:38 +01:00
Arsa
17df72114e Fixed #33340 -- Fixed unquoted column names in queries used by DatabaseCache. 2021-12-09 11:16:04 +01:00
David Smith
eba9a9b7f7 Refs #32338 -- Added Boundfield.legend_tag(). 2021-12-09 07:16:33 +01:00
Ömer Faruk Abacı
81739a45b5 Fixed #33319 -- Fixed crash when combining with the | operator querysets with aliases that conflict. 2021-12-08 21:16:24 +01:00
Ömer Faruk Abacı
f04b44bad4 Refs #33319 -- Added note about commutation of QuerySet's | operator. 2021-12-08 21:16:24 +01:00
Ömer Faruk Abacı
f1bfdff690 Refs #33319 -- Added comment about keys/values assertion in Query.change_aliases(). 2021-12-08 21:16:24 +01:00
Baptiste Mispelon
cb383753c0 Fixed #33346 -- Fixed SimpleTestCase.assertFormsetError() crash on a formset named "form".
Thanks OutOfFocus4 for the report.

Regression in 456466d932.
2021-12-08 20:33:03 +01:00
Shreya Bamne
8a4e506760 Fixed #19721 -- Allowed admin filters to customize the list separator. 2021-12-08 15:25:52 +01:00
Shreya Bamne
2b76f45749 Refs #19721 -- Corrected list formatting in admin filters docs. 2021-12-08 14:27:53 +01:00
Keryn Knight
7d02fa9433 Refs #32290 -- Optimized construct_relative_path() by delay computing has_quotes. 2021-12-08 08:17:54 +01:00
Erik Cederstrand
547656c850 Refs #25265 -- Allowed customizing Query's datastructure classes. 2021-12-07 13:36:50 +01:00
Nick Pope
dfdf1c6864 Improved release notes wording for template-based form rendering. 2021-12-07 12:44:33 +01:00
Adam Johnson
063cf98d3a
Fixed #31765 -- Enforced enhanced ALTER TABLE behavior for SQLite connections. 2021-12-07 12:32:05 +01:00
Mariusz Felisiak
adef3d975e Added stub release notes for 4.0.1. 2021-12-07 10:41:32 +01:00
Mariusz Felisiak
d7bd9eb6cd Finalized release notes for Django 4.0. 2021-12-07 10:02:41 +01:00
Mariusz Felisiak
513441240f
Updated asgiref dependency for 4.0 release series. 2021-12-07 09:49:39 +01:00
Claude Paroz
da7062be45
Removed unused map_options JS variable.
map_options is not referenced at all in OLMapWidget.js.

Unused since 2ebfda38e6.
2021-12-07 08:59:56 +01:00
Mariusz Felisiak
8747052411 Added CVE-2021-44420 to security archive. 2021-12-07 08:51:26 +01:00
Florian Apolloner
d4dcd5b9dd Fixed #30530, CVE-2021-44420 -- Fixed potential bypass of an upstream access control based on URL paths.
Thanks Sjoerd Job Postmus and TengMA(@te3t123) for reports.
2021-12-07 06:28:08 +01:00
Mariusz Felisiak
628b6a6869 Updated translations from Transifex.
This also fixes related i18n tests.

Forwardport of 4c5215ab03 from stable/4.0.x

Co-authored-by: Claude Paroz <claude@2xlibre.net>
2021-12-06 20:31:03 +01:00
Hannes Ljungberg
1eaf38fa87 Fixed #33335 -- Made model validation ignore functional unique constraints.
Regression in 3aa545281e.

Thanks Hervé Le Roy for the report.
2021-12-06 07:59:11 +01:00
Mariusz Felisiak
d3a64bea51
Refs #33333 -- Fixed PickleabilityTestCase.test_annotation_with_callable_default() crash on Oracle.
Grouping by LOBs is not allowed on Oracle. This moves a binary field to
a separate model.
2021-12-04 15:55:03 +01:00
Maxim Piskunov
d3f4c2b95d Fixed #33078 -- Added support for language regions in i18n_patterns(). 2021-12-03 12:57:06 +01:00
Mariusz Felisiak
4f7bbc6138 Refs #33078 -- Added extra assertions to MiscTests.test_get_language_from_path_real(). 2021-12-03 12:03:30 +01:00
Mariusz Felisiak
2c7846d992
Fixed #33333 -- Fixed setUpTestData() crash with models.BinaryField on PostgreSQL.
This makes models.BinaryField pickleable on PostgreSQL.

Regression in 3cf80d3fcf.

Thanks Adam Zimmerman for the report.
2021-12-03 11:56:22 +01:00
Georgi Yanchev
9c1fe446b6 Fixed #33339 -- Made QuerySet.bulk_create() use TO_NCLOB() for TextFields on Oracle. 2021-12-03 07:39:20 +01:00
Nick Pope
97e9a84d27 Removed unused country argument from GeoIP2._check_query().
Unused since its introduction in 79e68c225b.
2021-12-02 11:30:42 +01:00
Nick Pope
7d5058d870 Removed redundant GeoIP2._check_query() calls. 2021-12-02 11:30:42 +01:00
Nick Pope
adcb3a7a27 Removed unused GeoIP2._cache attribute.
Unused since its introduction in 79e68c225b.
2021-12-02 11:30:32 +01:00
Nick Pope
31bef51d8e Moved unnecessary inner import in GeoIP2.geos(). 2021-12-02 11:27:33 +01:00
Mariusz Felisiak
5def7f3f74 Updated various links to HTTPS and new locations.
Co-Authored-By: Nick Pope <nick@nickpope.me.uk>
2021-12-02 11:27:29 +01:00
Shivam Durgbuns
d75c387f46 Fixed #33334 -- Alphabetized form and model fields in reference docs. 2021-12-02 08:33:26 +01:00
Simon Charette
e5a92d400a Fixed #33282 -- Fixed a crash when OR'ing subquery and aggregation lookups.
As a QuerySet resolves to Query the outer column references grouping logic
should be defined on the latter and proxied from Subquery for the cases where
get_group_by_cols is called on unresolved expressions.

Thanks Antonio Terceiro for the report and initial patch.
2021-12-02 07:23:33 +01:00
Simon Charette
e3bde71676 Refs #32690 -- Altered lookups Query rhs alterations during initialization.
Having it happen at the lookup creation time ensures entry points
called before the compilation phase (e.g. get_group_by_cols) don't have
to duplicate the logic in charge of altering Query instances used as
rhs.

It also has the nice effect of reducing the amount of time the
alteration logic to once as opposed to multiple times if the queryset
is compiled more than once.
2021-12-02 07:00:52 +01:00
Przemysław Suliga
4ce59f602e Fixed #30398 -- Added CONN_HEALTH_CHECKS database setting.
The CONN_HEALTH_CHECKS setting can be used to enable database
connection health checks for Django's persistent DB connections.

Thanks Florian Apolloner for reviews.
2021-12-01 07:44:48 +01:00
Claude Paroz
64c3f049ea Fixed #33047 -- Fixed CheckConstraint crash with GIS lookups on PostGIS and MySQL GIS backends.
Thanks Daniel Swain for the report and Arsalan Ghassemi for the initial
patch.

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-11-30 20:06:29 +01:00
Mariusz Felisiak
ae4077e13e Added stub release notes and release date for 3.2.10, 3.1.14 and 2.2.25. 2021-11-30 11:25:00 +01:00
Claude Paroz
322a1a037d
Refs #25706 - Removed inline JavaScript from OpenLayers template.
This allows setting a Content-Security-Policy HTTP header.
2021-11-30 06:35:15 +01:00
Chris Jerdonek
3ff7f6cf07 Refs #32800 -- Renamed _sanitize_token() to _check_token_format(). 2021-11-29 10:48:31 +01:00
Chris Jerdonek
5d80843ebc Fixed #32800 -- Changed CsrfViewMiddleware not to mask the CSRF secret.
This also adds CSRF_COOKIE_MASKED transitional setting helpful in
migrating multiple instance of the same project to Django 4.1+.

Thanks Florian Apolloner and Shai Berger for reviews.

Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-11-29 10:47:39 +01:00
Shubh1815
05e29da421 Fixed #32545 -- Improved admin widget for raw_id_fields for UUIDFields.
Co-Authored-By: Jerome Leclanche <jerome@leclan.ch>
2021-11-29 07:16:26 +01:00