Jacob Walls
edbf930287
Fixed #29984 -- Added QuerySet.iterator() support for prefetching related objects.
...
Co-authored-by: Raphael Kimmig <raphael.kimmig@ampad.de>
Co-authored-by: Simon Charette <charette.s@gmail.com>
2022-01-25 06:12:04 +01:00
Keryn Knight
c27932ec93
Fixed #33460 -- Used VALUES clause for insert in bulk on SQLite.
...
SQLite 3.7.11 introduced the ability to use multiple values directly.
SQLite 3.8.8 made multiple values not subject to the
SQLITE_LIMIT_COMPOUND_SELECT (500).
2022-01-24 20:51:32 +01:00
Mariusz Felisiak
4ac0bf6acd
Fixed wrapping of long values in technical 500 debug page.
...
Follow up to d5f2d5d604
.
2022-01-24 11:54:41 +01:00
Hrushikesh Vaidya
89d137f3be
Fixed #33457 -- Fixed "Local vars" scrolling in technical 500 debug page.
...
Thanks Keryn Knight for the report and the initial patch.
2022-01-24 07:42:52 +01:00
Timothy McCurrach
efb4478e48
Fixed #33458 -- Fixed encoding of messages with empty string as extra_tags.
2022-01-24 07:05:53 +01:00
Claude Paroz
7c4f396509
Stopped including type="text/css" attributes for CSS link tags.
2022-01-22 16:38:14 +01:00
Jacob Walls
2d8232fa71
Fixed #26760 -- Added --prune option to migrate command.
2022-01-21 17:10:31 +01:00
Fabian Büchler
eeff1787b0
Fixed #33449 -- Fixed makemigrations crash on models without Meta.order_with_respect_to but with _order field.
...
Regression in aa4acc164d
.
2022-01-21 06:44:53 +01:00
Mariusz Felisiak
f605e85af9
Fixed #33453 -- Dropped support for GDAL 2.1.
2022-01-20 18:54:29 +01:00
Hrushikesh Vaidya
3fadf141e6
Fixed #33062 -- Made MultiPartParser remove non-printable chars from file names.
2022-01-20 07:19:52 +01:00
sean_c_hsu
0f6946495a
Fixed #31685 -- Added support for updating conflicts to QuerySet.bulk_create().
...
Thanks Florian Apolloner, Chris Jerdonek, Hannes Ljungberg, Nick Pope,
and Mariusz Felisiak for reviews.
2022-01-19 20:17:42 +01:00
Moritz Duchêne
ba9de2e74e
Updated GEOS/GDAL links in docs and comments.
2022-01-19 19:06:12 +01:00
Adam Johnson
dc8bb35e39
Fixed #33446 -- Added CSS source map support to ManifestStaticFilesStorage.
2022-01-18 12:53:14 +01:00
Nick Pope
fac26684fd
Removed unused buf_size argument to LimitedStream().
...
Unused since its introduction in 269e921756
.
2022-01-18 05:55:14 +01:00
Mariusz Felisiak
30a0144134
Fixed #29338 -- Allowed using combined queryset in Subquery.
...
Thanks Eugene Kovalev for the initial patch, Simon Charette for the
review, and Chetan Khanna for help.
2022-01-17 18:01:07 +01:00
My-Name-Is-Nabil
f37face331
Fixed #33435 -- Fixed invalid SQL generatered by Subquery.as_sql().
2022-01-17 09:00:46 +01:00
Ayush Joshi
0a17666045
Fixed #28135 -- Made simplify_regex() handle non-capturing groups.
2022-01-14 11:01:02 +01:00
Adam Johnson
fdfa97fb16
Fixed #33441 -- Restored immutability of models.Field.__hash__().
...
Regression in 502e75f9ed
.
2022-01-14 07:00:48 +01:00
Ayush Joshi
827bc07047
Refs #28135 -- Refactored out _find_groups()/_get_group_start_end() hooks in admindocs.
2022-01-13 16:33:19 +01:00
Adam Johnson
45a42aabfa
Fixed #29708 -- Deprecated PickleSerializer.
2022-01-13 13:50:20 +01:00
Adam Johnson
c920387fab
Optimized SessionBase.get_expire_at_browser_close().
2022-01-13 13:05:46 +01:00
Adam Johnson
436862787c
Refs #29708 -- Made SessionBase store expiry as string.
2022-01-13 13:05:42 +01:00
Adam Johnson
c6cb5a0277
Refs #29708 -- Stopped inheriting from PickleSerializer by RedisSerializer.
2022-01-13 12:28:06 +01:00
Adam Johnson
08d8bccbf1
Improved Model.__init__() properties loop.
...
This improves readability, accumulates unrecognized arguments raise an
exception with all of them, and avoids refetching the values.
2022-01-13 11:09:37 +01:00
Mariusz Felisiak
0a4a5e5bac
Refs #32681 -- Fixed VariableDoesNotExist when rendering some admin template.
...
Regression in 84609b3205
.
Follow up to 4e5bbb6ef2
.
Thanks Sourav Kumar for the report.
2022-01-13 10:10:48 +01:00
Hrushikesh Vaidya
6815da6e94
Fixed #33396 -- Added view name to technical 500 debug page.
2022-01-13 07:02:41 +01:00
Hrushikesh Vaidya
4099e6e737
Refs #33396 -- Added django.views.debug.get_caller() hook.
2022-01-13 06:50:06 +01:00
Adam Johnson
90cf963264
Changed django.utils.log.log_response() to take exception instance.
...
There's little point retrieving a fresh reference to the exception in
the legacy tuple format, when it's all available via the exception
instance we already have.
2022-01-12 20:23:42 +01:00
Hrushikesh Vaidya
d05ab13c56
Refs #33426 -- Simplified technical_404_response() with ResolverMatch._func_path.
2022-01-12 15:56:59 +01:00
Adam Johnson
84e98ba194
Added exception to SuspiciousOperation logging.
...
This allows better debugging and filtering of errors.
2022-01-12 13:27:25 +01:00
Hrushikesh Vaidya
18a15bbc9c
Fixed #33433 -- Avoided unnecessary resolve() calls in technical_404_response().
...
Thanks Keryn Knight for the initial patch.
2022-01-12 08:23:38 +01:00
Jacob Walls
dc9deea8e8
Fixed #11715 -- Changed default value of ModelAdmin.actions/inlines to empty tuples.
...
This clarifies the intended pattern of overwriting the default value
rather than mutating it.
2022-01-11 12:22:49 +01:00
Mariusz Felisiak
b111b15c12
Refs #30141 -- Removed unused branch in parse_duration().
...
Unused since 99fc5dc13c
.
2022-01-11 11:09:08 +01:00
mgaligniana
fa235004dd
Fixed #13251 -- Made pre/post_delete signals dispatch the origin.
2022-01-11 08:06:18 +01:00
Jacob Walls
6f78cb6b13
Fixed #29026 -- Added --scriptable option to makemigrations.
2022-01-10 18:49:57 +01:00
Keryn Knight
f4b06a3cc1
Fixed #33426 -- Fixed ResolverMatch.__repr_() for class-based views.
...
Regression in 7c08f26bf0
.
2022-01-10 17:30:41 +01:00
Baptiste Mispelon
3d7ac6420c
Simplified @stringfilter decorator and Library with unwrap().
...
Nowadays we can use inspect.unwrap() to retrieve the innermost function
object when needed, and most of the uses of _decorated_function were to
access the original __name__ which is not needed because
@functools.wraps sets that attribute correctly.
2022-01-10 08:31:43 +01:00
Keryn Knight
2a66c102d9
Fixed #33425 -- Fixed view name for CBVs on technical 404 debug page.
...
Regression in 0c0b87725b
.
2022-01-08 13:05:55 +01:00
Mariusz Felisiak
7346c288e3
Refs #32355 -- Removed unnecessary list() calls before reversed() on dictviews.
...
Dict and dictviews are iterable in reversed insertion order using
reversed() in Python 3.8+.
2022-01-07 16:29:15 +01:00
David
4c60c3edff
Fixed #33419 -- Restored marking forms.Field.help_text as HTML safe.
...
Regression in 456466d932
.
Thanks Matt Westcott for the report.
2022-01-07 15:35:31 +01:00
Ad Timmering
bdf3e156b4
Fixed #28628 -- Changed \d to [0-9] in regexes where appropriate.
2022-01-07 12:25:06 +01:00
Allen Jonathan David
28c98d4113
Fixed #33216 -- Simpilified deconstructed paths for some expressions.
2022-01-07 11:19:29 +01:00
Keryn Knight
96e7ff5e9f
Avoided isinstance(…, Variable) calls in FilterExpression.resolve().
...
By determining the variable type within __init__() instead of resolve()
we can skip an isinstance() check at template runtime. Templates are
executed in production more often than the parse trees themselves,
assuming the cached Loader is used.
2022-01-07 10:29:22 +01:00
Baptiste Mispelon
c67e1cf44f
Refs #33348 -- Deprecated passing errors=None to SimpleTestCase.assertFormError()/assertFormsetErrors().
2022-01-06 17:29:32 +01:00
Petter Friberg
bc174e6ea0
Fixed #33410 -- Fixed recursive capturing of callbacks by TestCase.captureOnCommitCallbacks().
...
Regression in d89f976bdd
.
2022-01-06 06:38:17 +01:00
Ad Timmering
806efe912b
Fixed #33400 -- Added support for msg_prefix and count arguments to assertTemplateUsed()/assertTemplateNotUsed() used as context managers.
2022-01-05 12:49:42 +01:00
Ad Timmering
e700a3714f
Refs #33400 -- Renamed SimpleTestCase._assert_template_used() to _get_template_used().
2022-01-05 11:46:26 +01:00
Jamie Matthews
f5233dce30
Fixed #32511 -- Corrected handling prefetched nested reverse relationships.
...
When prefetching a set of child objects related to a set of parent
objects, we usually want to populate the relationship back from the
child to the parent to avoid a query when accessing that relationship
attribute. However, there's an edge case where the child queryset
itself specifies a prefetch back to the parent. In that case, we want
to use the prefetched relationship rather than populating the reverse
relationship from the parent.
2022-01-05 09:49:05 +01:00
Allen Jonathan David
205f67cd5b
Refs #33216 -- Made @deconstructible do not change path for subclasses.
2022-01-04 13:15:29 +01:00
Florian Apolloner
6d343d01c5
Fixed CVE-2021-45452 -- Fixed potential path traversal in storage subsystem.
...
Thanks to Dennis Brinkrolf for the report.
2022-01-04 10:04:12 +01:00
Florian Apolloner
761f449e0d
Fixed CVE-2021-45116 -- Fixed potential information disclosure in dictsort template filter.
...
Thanks to Dennis Brinkrolf for the report.
Co-authored-by: Adam Johnson <me@adamj.eu>
2022-01-04 10:03:56 +01:00
Florian Apolloner
968a3d01fa
Fixed CVE-2021-45115 -- Prevented DoS vector in UserAttributeSimilarityValidator.
...
Thanks Chris Bailey for the report.
Co-authored-by: Adam Johnson <me@adamj.eu>
2022-01-04 10:02:05 +01:00
David Wobrock
482ee63b6f
Fixed #33402 -- Optimized multiple AlterFooTogether operations.
2022-01-04 06:24:03 +01:00
Keryn Knight
0ed2919814
Fixed #33406 -- Avoided creation of MaxLengthValidator(None) when resolving Value.output_field for strings.
...
This brings the behaviour in line with Field subclasses which append to
the validators within __init__(), like BinaryField, and prevents the
creation of a validator which incorrectly throws a TypeError, if it
were used.
2022-01-04 05:51:00 +01:00
Mariusz Felisiak
30613d6a74
Fixed #33408 -- Fixed adding nullable unique fields on SQLite.
...
Regression in 2f73e5406d
.
Thanks Alan Crosswell for the report.
2022-01-04 05:50:00 +01:00
Jacob Walls
0ab58c1209
Refs #29026 -- Allowed customizing InteractiveMigrationQuestioner's prompt destination.
...
Previously, the questioner did not obey the value of stdout provided
to the command.
2022-01-03 12:30:51 +01:00
Mariusz Felisiak
a21a63cc28
Refs #27753 -- Removed unused django.utils.text._replace_entity() and _entity_re.
...
Unused since 157ab32f34
.
2021-12-30 13:19:25 +01:00
Shubh1815
aecfc40c88
Fixed #33300 -- Ensured hidden elements are not displayed on small screens.
2021-12-30 07:57:36 +01:00
Jacob Walls
92412aa94c
Fixed #23273 -- Avoided creation of django_migrations table when there are no migrations to apply.
2021-12-30 06:36:55 +01:00
Mariusz Felisiak
361bb8f786
Refs #26872 -- Fixed wrapping of long choices in ModelAdmin.list_filter.
...
Regression in 269a767146
.
2021-12-29 10:57:23 +01:00
Keryn Knight
d5f2d5d604
Fixed wrapping of long values in technical 500 debug page.
2021-12-29 07:59:45 +01:00
David Smith
950d697b95
Refs #31617 -- Removed redundant title text in filter.html.
...
Unnecessary since 269a767146
.
Title text should provide advisory information and should not be the
same or very similar to the element text.
2021-12-28 13:42:35 +01:00
Hannes Ljungberg
59a66f0512
Refs #33342 -- Deprecated ExclusionConstraint.opclasses.
2021-12-27 08:55:18 +01:00
Tim Graham
ff225fac1d
Refs #29517 -- Removed obsolete PositiveIntegerField test skip.
2021-12-27 06:16:59 +01:00
Hannes Ljungberg
0e656c02fe
Fixed #33342 -- Added support for using OpClass() in exclusion constraints.
2021-12-24 11:39:00 +01:00
David Smith
a0d43a7a6e
Refs #31617 -- Changed dark mode primary-fg to give higher contrast to secondary.
2021-12-23 21:10:25 +01:00
Adam Johnson
5f6a727a6a
Refs #33355 -- Constructed SQLite list aggregate types once.
2021-12-23 12:08:33 +01:00
Adam Johnson
ec7554f1c2
Refs #33355 -- Removed @none_guard from SQLite functions.
...
Co-Authored-By: Nick Pope <nick@nickpope.me.uk>
2021-12-23 12:00:29 +01:00
Adam Johnson
deec15a9a6
Refs #33355 -- Made trunc functions raise ValueError on invalid lookups on SQLite.
...
Co-Authored-By: Nick Pope <nick@nickpope.me.uk>
2021-12-23 11:47:13 +01:00
Adam Johnson
2d991ff661
Refs #33355 -- Moved SQLite functions to separate module.
...
Co-Authored-By: Nick Pope <nick@nickpope.me.uk>
2021-12-23 11:47:08 +01:00
Adam Johnson
fa4b2c15f2
Refs #33355 -- Optimized LPad() database function on SQLite.
...
Co-Authored-By: Nick Pope <nick@nickpope.me.uk>
2021-12-23 06:56:30 +01:00
Mariusz Felisiak
ca04659b4b
Refs #32355 -- Bumped required psycopg2 version to 2.8.4.
...
psycopg2 2.8.4 is the first release to support Python 3.8.
2021-12-22 20:32:55 +01:00
Adam Johnson
c4328c2f4e
Refs #33355 -- Optimized Trunc() on SQLite by using f-strings.
...
Co-Authored-By: Nick Pope <nick@nickpope.me.uk>
2021-12-22 11:47:55 +01:00
Adam Johnson
a8fa3e5cd7
Refs #33355 -- Added missing tests for database functions and expression on null values.
2021-12-22 11:46:18 +01:00
Brenton Partridge
19fb838803
Fixed #32600 -- Fixed Geometry collections and Polygon segmentation fault on macOS ARM64.
2021-12-21 13:00:09 +01:00
Baptiste Mispelon
e95e6425ac
Refs #24121 -- Added __repr__() to BaseFormSet.
2021-12-21 12:06:05 +01:00
vavanade
6045b1f041
Fixed typo in django/forms/widgets.py.
2021-12-21 09:14:58 +01:00
Adam Johnson
33401cba93
Optimized MiddlewareMixin coroutine check.
2021-12-21 08:41:29 +01:00
Adam Johnson
cc752c1c3a
Optimized django.template.autoreload.get_template_directories() a bit.
2021-12-21 08:39:40 +01:00
David Wobrock
72b23c04d8
Fixed #33374 -- Fixed ExpressionWrapper annotations with full queryset.
2021-12-21 06:17:04 +01:00
mendespedro
e8b4feddc3
Fixed #33367 -- Fixed URLValidator crash in some edge cases.
2021-12-20 07:30:22 +01:00
mendespedro
4fd3044ca0
Fixed #33368 -- Fixed parse_duration() crash on invalid separators for decimal fractions.
2021-12-20 06:46:34 +01:00
Adam Johnson
b0d16d0129
Changed signatures of setting_changed signal receivers.
2021-12-17 13:07:04 +01:00
Simon Charette
4328970780
Fixed #33366 -- Fixed case handling with swappable setting detection in migrations autodetector.
...
The migration framework uniquely identifies models by case insensitive
labels composed of their app label and model names and so does the app
registry in most of its methods (e.g. AppConfig.get_model) but it
wasn't the case for get_swappable_settings_name() until this change.
This likely slipped under the radar for so long and only regressed in
b9df2b74b9
because prior to the changes
related to the usage of model states instead of rendered models in the
auto-detector the exact value settings value was never going through a
case folding hoop.
Thanks Andrew Chen Wang for the report and Keryn Knight for the
investigation.
2021-12-17 07:46:58 +01:00
Mariusz Felisiak
40165eecc4
Fixed #33350 -- Reallowed using cache decorators with duck-typed HttpRequest.
...
Regression in 3fd82a6241
.
Thanks Terence Honles for the report.
2021-12-16 20:13:17 +01:00
mgaligniana
068b2c072b
Fixed #30127 -- Deprecated name argument of cached_property().
2021-12-16 18:52:27 +01:00
ahmadekhalili
bf7afe9c4e
Fixed admin CSS for calendar widget for RTL languages.
...
Thanks Theodore Ni and Shai Berger for reviews.
2021-12-16 08:11:13 +01:00
mgaligniana
ac5cc6cf01
Fixed #33316 -- Added pagination to admin history view.
2021-12-15 10:54:08 +01:00
mgaligniana
ff0b81b56b
Refs #33316 -- Moved paginator styles to base.css.
2021-12-15 10:54:08 +01:00
Jacob Walls
76ccce64cc
Fixed #16063 -- Adjusted admin changelist searches spanning multi-valued relationships.
...
This reduces the likelihood of admin searches issuing queries with
excessive joins.
2021-12-15 08:14:19 +01:00
Florian Apolloner
e1d673c373
Fixed unescape_string_literal() crash on empty strings.
2021-12-14 20:19:44 +01:00
mdalp
3b73f77ad4
Fixed #33358 -- Fixed handling timedelta < 1 day in schema operations on Oracle.
2021-12-14 09:08:25 +01:00
Jeremy Lainé
2f33217ea2
Fixed #33361 -- Fixed Redis cache backend crash on booleans.
2021-12-14 07:16:30 +01:00
Adam Johnson
41329b9852
Improved wording in password validators docs and docstrings.
2021-12-13 18:53:07 +01:00
Adam Johnson
5111b636d9
Refs #33355 -- Fixed Trunc() with years < 1000 on SQLite.
...
Thanks to Nick Pope for spotting the bug in Code Review.
Co-Authored-By: Nick Pope <nick@nickpope.me.uk>
2021-12-13 11:50:45 +01:00
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
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
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
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ı
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
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
Adam Johnson
063cf98d3a
Fixed #31765 -- Enforced enhanced ALTER TABLE behavior for SQLite connections.
2021-12-07 12:32:05 +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
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
Maxim Piskunov
d3f4c2b95d
Fixed #33078 -- Added support for language regions in i18n_patterns().
2021-12-03 12:57:06 +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
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
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
Hannes Ljungberg
ed2018037d
Fixed #33322 -- Fixed loss of assigned related object when saving relation with bulk_update().
2021-11-29 06:27:22 +01:00
Baptiste Mispelon
9ac92b1efc
Refs #33301 -- Made SimpleTestCase.assertFormError()/assertFormsetErrors() raise ValueError for non test client responses.
2021-11-26 13:10:43 +01:00
Hasan Ramezani
24b316536a
Fixed #33303 -- Changed messages' level tags on MESSAGE_TAGS setting change.
2021-11-26 07:09:31 +01:00
Ad Timmering
9a6e2df3a8
Fixed #32397 -- Made startapp/startproject management commands set User-Agent.
...
This sets User-Agent to 'Django/<version>'.
2021-11-25 20:36:04 +01:00
Mariusz Felisiak
e361621dbc
Removed unneeded can_use_chunked_reads feature flag on SQLite.
...
Unneeded since c0e3c65b9d
.
2021-11-25 20:08:46 +01:00
Shubh1815
51c24d8799
Fixed #33024 -- Fixed height of admin selector boxes in collapsed fieldset.
...
Thanks Tom Carrick for the review.
2021-11-25 07:57:19 +01:00
Ad Timmering
59f4796918
Fixed #4282 -- Made startapp/startproject management commands honor umask.
...
Co-authored-by: Christian Schmitt <c.schmitt@briefdomain.de>
2021-11-24 13:10:45 +01:00
Mariusz Felisiak
1555e5850d
Removed unneeded supports_combined_alters feature flag on Oracle.
...
supports_combined_alters is False by default.
2021-11-24 10:23:43 +01:00
Álvaro Pelegrina Fernández
98352ddf3a
Fixed #33310 -- Removed unused rule from admin CSS.
...
Unused since 30e59705fc
.
2021-11-23 21:14:36 +01:00
arsalan.ghassemi
bdcda1ca9b
Fixed #33309 -- Fixed QuerySet.distinct() crash on mixed case annotation.
2021-11-23 20:43:20 +01:00
Simon Charette
aec71aaa5b
Fixed #33304 -- Allowed passing string expressions to Window(order_by).
2021-11-23 07:58:44 +01:00
Simon Charette
e06dc4571e
Refs #33304 -- Enclosed aggregate ordering logic in an expression.
...
This greatly simplifies the implementation of contrib.postgres'
OrderableAggMixin and allows for reuse in Window expressions.
2021-11-23 07:28:27 +01:00
Baptiste Mispelon
e6e664a711
Fixed #33302 -- Made element_id optional argument for json_script template filter.
...
Added versionchanged note in documentation
2021-11-22 11:52:19 +01:00
Baptiste Mispelon
a0ed3cfad1
Fixed #33305 -- Fixed autodetector crash for ForeignKey with hardcoded "to" attribute.
...
Co-authored-by: Simon Charette <charette.s@gmail.com>
2021-11-22 06:46:25 +01:00
SwastikTripathi
a7e7043c87
Fixed #33229 -- Fixed BaseDatabaseOperations.adapt_datetimefield_value()/adapt_timefield_value() crash with expressions.
2021-11-19 09:47:57 +01:00
Jonny Park
6fa2930573
Refs #24121 -- Added __repr__() to BaseDatabaseWrapper, JoinPromoter, and SQLCompiler.
2021-11-19 07:57:02 +01:00
jhisham
5e218cc0b7
Added Malay language.
2021-11-18 20:57:50 +01:00
Shubh1815
bb223c6f78
Fixed #28357 -- Fixed ModelAdmin.prepopulated_fields on newly added stacked inline.
...
Thanks Jakob Köhler for the initial patch.
2021-11-16 12:24:56 +01:00
Maxim Piskunov
12fe3224f5
Fixed #33287 -- Made GeoJSON serializer use json.loads() instead of eval().
...
Thanks David Wyde for the report.
2021-11-15 20:34:33 +01:00
SwastikTripathi
76f07b4fcf
Fixed #33278 -- Improved error for connection/query attempts against disallowed databases in tests.
2021-11-15 11:46:10 +01:00