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
Simon Charette
560ff988dd
Refs #33288 -- Removed SQLite's DatabaseIntrospection._get_foreign_key_constraints().
...
The get_relations() method returns the exact same data in a more generic
format.
2021-11-15 08:20:30 +01:00
Simon Charette
483e30c3d5
Fixed #33288 -- Made SQLite introspection use information schema for relations.
...
Previous solution was using brittle and complex parsing rules to
extract them from the SQL used to define the tables.
Removed a now unnecessary unit test that ensured the removed parsing
logic accounted for optional spacing.
2021-11-15 08:07:07 +01:00
Simon Charette
30ec7fe89a
Refs #33288 -- Made SQLite introspection raise DatabaseError on nonexistent tables.
...
All the other backends behave this way and we had to make adjustments
to our test suite to account for this discrepancy.
This also allows SQLite's get_relations() not to raise on a nonexistent
table while making sure the InspectDBTestCase.test_introspection_errors
test which ensures an error during introspection is surfaced in
generated models files still passes.
2021-11-15 07:57:00 +01:00
Krzysztof Jagiello
8d9827c06c
Fixed #33161 -- Enabled durability check for nested atomic blocks in TestCase.
...
Co-Authored-By: Adam Johnson <me@adamj.eu>
2021-11-12 13:05:56 +01:00
Can Sarigol
661316b066
Fixed #33279 -- Fixed handling time zones with "-" sign in names.
...
Thanks yakimka for the report.
Regression in fde9b7d35e
.
2021-11-12 07:30:02 +01:00
Claude Paroz
78163d1ac4
Moved RequestSite import to the toplevel.
2021-11-12 06:41:48 +01:00
Lie Ryan
05cde4764d
Fixed #33269 -- Made AnonymousUser/PermissionsMixin.has_perms() raise ValueError on string or non-iterable perm_list.
2021-11-11 20:26:29 +01:00
Ad Timmering
4bfe8c0eec
Fixed #6106 -- Prevented makemessages from changing .po files when up to date.
...
Co-authored-by: Daniyal Abbasi <abbasi.daniyal98@gmail.com>
2021-11-11 09:12:05 +01:00
Mariusz Felisiak
0b95a96ee1
Removed DatabaseIntrospection.get_key_columns().
...
Thanks Simon Charette for the report.
2021-11-10 16:38:43 +01:00
Tim Graham
afea68ca51
Fixed DatabaseIntrospection.get_relations() docstring.
...
The foreign keys are "in" the given table, not "to" it.
2021-11-10 06:21:36 +01:00
Mariusz Felisiak
6bc437c0d8
Refs #33263 -- Added warning to BaseDeleteView when delete() method is overridden.
...
Follow up to 3a45fea083
.
2021-11-09 09:03:40 +01:00
Baptiste Mispelon
91acfc3514
Fixed #33264 -- Made test runner return non-zero error code for unexpected successes.
2021-11-08 20:19:21 +01:00
Matthijs Kooijman
1a5023883b
Fixed #33257 -- Fixed Case() and ExpressionWrapper() with decimal values on SQLite.
2021-11-08 18:02:56 +01:00
Keryn Knight
4f8c7fd9d9
Fixed #32980 -- Made models cache related managers.
2021-11-08 08:44:12 +01:00
Mariusz Felisiak
ba9ced3e9a
Fixed #33253 -- Reverted "Fixed #32319 -- Added ES module support to ManifestStaticFilesStorage."
...
This reverts commit 91e21836f6
.
`export` and `import` directives have several syntax variants and not
all of them were properly covered.
Thanks Hervé Le Roy for the report.
2021-11-05 12:11:18 +01:00
David Smith
c6c6cd3c5a
Fixed #33235 -- Removed "for = ..." from MultiWidget's <label>.
...
This improves accessibility for screen reader users.
2021-11-05 11:05:52 +01:00
Carlton Gibson
4816dc9428
Fixed #33237 -- Fixed detecting source maps in ManifestStaticFilesStorage for multiline files.
...
Switched regex to multiline mode in order to match per-line, rather
than against the whole file.
Thanks to Joseph Abrahams for the report.
Regression in 781b44240a
.
2021-11-04 20:28:35 +01:00
Guilherme Martins Crocetti
fc565cb539
Fixed #27147 -- Allowed specifying bounds of tuple inputs for non-discrete range fields.
2021-11-04 19:08:57 +01:00
Hannes Ljungberg
a934d377af
Fixed #33262 -- Fixed crash of conditional aggregation on Exists().
2021-11-04 06:31:32 +01:00
Hannes Ljungberg
25157033e9
Fixed #33260 -- Fixed crash when chaining QuerySet.exists() after select_for_update(of=()).
2021-11-03 20:08:14 +01:00
Keryn Knight
a697424969
Fixed #32996 -- Cached PathInfos on relations.
...
PathInfo values are ostensibly static over the lifetime of the object
for which they're requested, so the data can be memoized, quickly
amortising the cost over the process' duration.
2021-11-03 11:27:04 +01:00
Iuri de Silvio
3ff7b15bb7
Fixed #33252 -- Made cache middlewares thread-safe.
2021-11-03 09:39:27 +01:00
tim-mccurrach
1f9874d4ca
Refs #33245 -- Minor edits to django.utils.html.urlize() changes.
...
Follow up to ad81b606a2
.
2021-11-03 08:14:50 +01:00
Roman
407fe95cb1
Fixed #32691 -- Made Exact lookup on BooleanFields compare directly to a boolean value on MySQL.
...
Performance regression in 37e6c5b79b
.
Thanks Todor Velichkov for the report.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-11-02 21:30:21 +01:00
jordan.bae
aaf9b55858
Fixed #33187 -- Made inspectdb handle ForeignKey.to_field attribute.
2021-11-02 18:53:11 +01:00
Mariusz Felisiak
dab48b7482
Fixed #33234 -- Fixed autodetector crash for proxy models inheriting from non-model class.
...
Regression in aa4acc164d
.
Thanks Kevin Marsh for the report.
2021-11-02 15:34:08 +01:00
Hasan Ramezani
c069ee0b9d
Fixed #33224 -- Removed DatabaseFeatures.supports_mixed_date_datetime_comparisons.
2021-11-02 07:30:38 +01:00
andrewdotn
9e6d631697
Fixed #33246 -- Made squashmigrations raise CommandError when squashed_name already exists.
2021-11-02 07:13:42 +01:00
Timothy McCurrach
ad81b606a2
Fixed #33245 -- Made django.utils.html.urlize() thread-safe.
...
Regression in e567670b1a
.
2021-11-01 06:27:58 +01:00
Pratyush Mittal
f38458fe56
Fixed #33236 -- Fixed assertHTMLEqual() error messages for escaped HTML.
2021-10-29 12:09:23 +02:00
Chinmoy
073b7b5915
Fixed #33228 -- Changed value of BaseDatabaseFeatures.has_case_insensitive_like to False.
2021-10-28 17:56:29 +02:00
Mariusz Felisiak
8e3b1cf098
Removed unused model's Options.installed.
...
Unused since f9698c4391
.
2021-10-28 16:08:59 +02:00
Iuri de Silvio
afeafd6036
Fixed #33201 -- Made RenameModel operation a noop for models with db_table.
2021-10-27 12:41:29 +02:00
Matteo Vitali
3f1f8b9376
Fixed #33182 -- Moved admin dark mode vars to separate stylesheet and template block.
2021-10-27 10:34:01 +02:00
Anv3sh
69af4d09ba
Fixed #32672 -- Fixed introspection of primary key constraints on SQLite.
...
Thanks Simon Charette for the implementation idea.
2021-10-26 09:50:23 +02:00
Jacob Walls
def09bf412
Fixed #27079 -- Avoided multiple setUpClass()/tearDownClass() calls in LiveServerTestCase tests.
2021-10-26 07:47:40 +02:00
David Wobrock
0314593fe8
Fixed #31503 -- Made autodetector remove unique/index_together before altering fields.
2021-10-25 10:10:02 +02:00
Hasan Ramezani
c1e4111c74
Fixed #33205 -- Made call_command() raise TypeError when dest with multiple arguments is passed.
2021-10-25 07:48:06 +02:00
Manaia Junior
551c997fea
Fixed #33214 -- Added BaseDatabaseOperations.format_for_duration_arithmetic() stub method.
2021-10-22 08:19:02 +02:00
David Smith
480191244d
Fixed #25916 -- Added lastmod support to sitemap index view.
...
Co-authored-by: Matthew Downey <matthew.downey@webit.com.au>
2021-10-21 15:26:22 +02:00
Carlton Gibson
2ccc0b22db
Fixed #33211 -- Updated tests for Selenium 4.0.0.
...
Replaced deprecated `find_element[s]_by_*()` usages, in favour of
`find_element[s]()` with an explicit `By`.
2021-10-21 14:37:16 +02:00
Carlton Gibson
8fa974fcdd
Refs #33211 -- Added assertCountSeleniumElements() test helper.
2021-10-21 14:37:16 +02:00
Adam Johnson
45f48ed4f7
Made F deconstruction omit 'expressions' in the path.
2021-10-21 09:40:52 +02:00
Vinay Karanam
8806e8809e
Fixed #33043 -- Made method_decorator() preserve wrapper assignments.
...
Regression in f434f5b84f
.
2021-10-20 16:48:00 +02:00
Shreya Bamne
004b4620f6
Fixed #32987 -- Added system check for template tag modules with the same name.
...
Co-authored-by: Daniel Fairhead <daniel@dev.ngo>
2021-10-20 11:15:47 +02:00
Daniel Fairhead
b98394fa62
Refs #32987 -- Refactored out get_template_tag_modules().
2021-10-20 09:40:15 +02:00
David Smith
7ef0bc922c
Refs #32956 -- Capitalized HTTP/HTTPS in comments, docs, and docstrings.
2021-10-20 08:40:19 +02:00
Simon Charette
5896aa8367
Fixed #33197 -- Made field rename with prior matching db_column change a noop.
...
Thanks Jacob Walls for the report.
2021-10-19 06:46:35 +02:00
David Smith
69b0736fad
Refs #32956 -- Changed docs to treat the acronym HTTP phonetically.
2021-10-18 21:00:28 +02:00
Hannes Ljungberg
86971c4090
Fixed #33194 -- Fixed migrations when altering a field with functional indexes/unique constraints on SQLite.
...
This adjusts Expressions.rename_table_references() to only update alias
when needed.
Regression in 83fcfc9ec8
.
Co-authored-by: Simon Charette <charettes@users.noreply.github.com>
2021-10-18 08:25:23 +02:00
Claude Paroz
e567670b1a
Fixed #33195 -- Refactored urlize() based on a class.
...
This allows easier customization/
2021-10-15 09:20:01 +02:00
Carlton Gibson
4a58dfd9db
Refs #30509 -- Adjusted internal FileResponse variable name.
...
Follow up to dc724c5bf9
.
2021-10-15 07:29:55 +02:00
Jacob Walls
15683cdb95
Fixed #23953 -- Made makemigrations continue number sequence for squashed migrations.
2021-10-15 06:59:31 +02:00
Claude Paroz
514c16e85f
Removed unused DOTS list.
...
Unused since 4ff389dcdc
.
2021-10-14 19:56:37 +02:00
Piotr Kunicki
dc724c5bf9
Fixed #30509 -- Made FileResponse better handle buffers and non-zero file offsets.
2021-10-14 15:05:04 +02:00
Martin Svoboda
cc4cb95bef
Fixed #33008 -- Fixed prefetch_related() for deleted GenericForeignKeys.
...
Thanks Simon Charette for the implementation idea.
2021-10-14 12:37:03 +02:00
Erik Cederstrand
14c8504a37
Refs #25265 -- Allowed Query subclasses to build filters.
2021-10-13 07:31:25 +02:00
Jacob Walls
32f1fe5f89
Fixed #29470 -- Logged makemigrations automatic decisions in non-interactive mode.
2021-10-12 15:19:39 +02:00
Ade Lee
d10c7bfe56
Fixed #28401 -- Allowed hashlib.md5() calls to work with FIPS kernels.
...
md5 is not an approved algorithm in FIPS mode, and trying to instantiate
a hashlib.md5() will fail when the system is running in FIPS mode.
md5 is allowed when in a non-security context. There is a plan to add a
keyword parameter (usedforsecurity) to hashlib.md5() to annotate whether
or not the instance is being used in a security context.
In the case where it is not, the instantiation of md5 will be allowed.
See https://bugs.python.org/issue9216 for more details.
Some downstream python versions already support this parameter. To
support these versions, a new encapsulation of md5() has been added.
This encapsulation will pass through the usedforsecurity parameter in
the case where the parameter is supported, and strip it if it is not.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-10-12 08:58:27 +02:00
Christophe Henry
b1b26b37af
Fixed #33178 -- Made createsuperuser validate required fields passed in options in interactive mode.
2021-10-12 08:08:05 +02:00
Christophe Henry
4ff500f294
Refs #21755 -- Fixed createsuperuser crash for required foreign keys passed in options in interactive mode.
...
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-10-12 06:59:46 +02:00
Mariusz Felisiak
da266b3c5c
Refs #29628 , Refs #33178 -- Made createsuperuser validate password against required fields passed in options.
2021-10-12 06:21:14 +02:00
Abhyudai
7872971dfb
Fixed #33149 -- Made test runner --pdb option work with subTest().
...
Thanks Lucidot for the report and Mariusz Felisiak for the initial
patch.
2021-10-11 10:47:33 +02:00
Seonghyeon Cho
aa0d796e37
Refs #32900 -- Restored '[y/N]' in questioner prompt when merging migrations.
...
Regression in 02bc7161ec
.
2021-10-11 09:04:09 +02:00
Christophe Henry
df2d2bc95c
Fixed #33151 -- Fixed createsuperuser crash for many-to-many required fields in non-interactive mode.
2021-10-07 12:37:16 +02:00
Bernd Wechner
2116238d5f
Fixed #33131 -- Improved error messages for clashing reverse accessor names.
2021-10-06 12:33:15 +02:00
Maxim Milovanov
1c802ca2a9
Fixed #33156 -- Used sessionStorage to preserve quick filter for admin's navigation sidebar.
2021-10-06 09:01:31 +02:00
Jacob Walls
47f791f132
Fixed #23408 -- Added migrations questioner prompt for adding unique fields with a callable default.
2021-10-06 08:05:33 +02:00
Simon Charette
0f3e1a54bf
Refs #26430 -- Removed unused branch in sql.Query.get_count().
...
Now that sql.Query.get_aggregation() properly deals with empty result
sets summary Count() annotations cannot result in None.
Unused since 9f3cce172f
.
2021-10-06 07:25:17 +02:00
Jacob Walls
f153e9214f
Refs #29026 -- Added log() to makemigrations.
2021-10-05 06:57:01 +02:00
Nick Pope
a3185a6701
Refs #33107 -- Optimized cached_import() helper.
2021-10-04 07:47:49 +02:00
Nick Pope
c2f6c05c4c
Refs #32943 -- Added support for covering exclusion constraints using SP-GiST indexes on PostgreSQL 14+.
2021-10-01 13:11:37 +02:00
Nick Pope
e76f9d5b44
Refs #32943 -- Added support for covering SP-GiST indexes on PostgreSQL 14+.
2021-10-01 13:11:34 +02:00
Nick Pope
bd47b9bc81
Fixed #32961 -- Added BitXor() aggregate to django.contrib.postgres.
2021-10-01 10:32:39 +02:00
Nick Pope
000d430234
Fixed typo in exception message for GiST indexes and exclusion constraints.
2021-10-01 09:46:36 +02:00
Daniel Hahler
98c8bf1cee
Fixed #33160 -- Avoided suppressing query errors in _nodb_cursor() on PostgreSQL.
2021-10-01 07:23:57 +02:00
Yash Jhunjhunwala
492ed60f23
Fixed #33029 -- Allowed multiple popups for self-related fields in admin.
2021-09-30 15:42:30 +02:00
Adam Johnson
37d9ea5d5c
Optimized @async_unsafe.
...
Switched the order of the checks to reduce the overhead. Async unsafe methods
are *normally* called syncrhonously, so we can avoid the overhead of checking
the environment variable in the regular path.
2021-09-30 12:16:00 +02:00
Aljaž Košir
7b8beeee3d
Fixed #33155 -- Made ModelChoiceIteratorValue instances hashable.
2021-09-30 12:07:50 +02:00
Mariusz Felisiak
903aaa35e5
Fixed #33159 -- Reverted "Fixed #32970 -- Changed WhereNode.clone() to create a shallow copy of children."
...
This reverts commit e441847eca
.
A shallow copy is not enough because querysets can be reused and
evaluated in nested nodes, which shouldn't mutate JOIN aliases.
Thanks Michal Čihař for the report.
2021-09-30 11:26:17 +02:00
David Wobrock
dd1fa3a31b
Fixed #33018 -- Fixed annotations with empty queryset.
...
Thanks Simon Charette for the review and implementation idea.
2021-09-29 20:23:29 +02:00
David Wobrock
ad36a198a1
Fixed #33141 -- Renamed Expression.empty_aggregate_value to empty_result_set_value.
2021-09-29 12:58:01 +02:00
Chenyang Yan
36d54b7a14
Fixed #33027 -- Made autoreloader pass -X options.
2021-09-29 11:37:50 +02:00
David Smith
4884a87e02
Fixed #33134 -- Fixed recursion depth error when rendering Form with BoundFields.
...
Regression in 456466d932
.
2021-09-29 08:04:42 +02:00
Chinmoy Chakraborty
b7fd668b37
Fixed #33033 -- Prevented models.DecimalField from accepting NaN values.
2021-09-28 13:20:14 +02:00
Jordan Bae
f5a3243911
Fixed #33125 -- Avoided redundant unique constraint when converting a non-unique field to primary key on MySQL and PostgreSQL.
2021-09-28 06:20:37 +02:00