Alexander Freyr L
b4817d20b9
Fixed #33728 -- Reordered submit buttons in admin.
...
Thanks Tom Carrick and Thibaud Colas for reviews.
2022-07-17 13:23:53 +02:00
Tim Graham
282d58e193
Refs #25232 -- Simplified ModelBackend.user_can_authenticate().
...
Thanks Jay Turner for the suggestion.
2022-07-11 20:27:11 +02:00
Mariusz Felisiak
eb3699ea77
Fixed #33718 -- Dropped support for MySQL 5.7.
2022-07-08 13:30:12 +02:00
Stéphane "Twidi" Angel
ccbf714ebe
Fixed #33829 -- Made BaseConstraint.deconstruct() and equality handle violation_error_message.
...
Regression in 667105877e
.
2022-07-08 08:17:42 +02:00
Carlton Gibson
6f80050496
Fixed #33781 -- Restored alignment for admin split-field timezone warnings.
...
Regression in f3e2bb0833
.
Refs #33750 and #27207 .
2022-07-07 11:32:05 +02:00
Ankur
eb7b8f3699
Fixed #33805 -- Made admin's many-to-many widgets do not display help text for selecting values when allow_multiple_selected is False.
2022-06-28 06:04:42 +02:00
Florian Apolloner
e6f36ea0a9
Made HashedFilesMixin ignore URLs without a path.
2022-06-23 08:59:49 +02:00
Marcelo Galigniana
d80a258553
Fixed #33028 -- Used ModelAdmin's opts attribute instead of model._meta.
2022-06-22 07:50:24 +02:00
Claude Paroz
de74a74b4b
Fixed #33794 -- Fixed string-casting of GIS queries on PostgreSQL.
...
Regression in 64c3f049ea
.
2022-06-21 10:10:37 +02:00
Ankur
d19a53d8e3
Fixed #33784 -- Removed unnecessary format escaping in admin calendar widget.
...
Replacements were added in fa0653cd1d
where we created a callback function by concatenating strings. It's
unnecessary since d638cdc42a
.
2022-06-18 20:21:28 +02:00
Matt Brewer
8d160f154f
Fixed #33788 -- Added TrigramStrictWordSimilarity() and TrigramStrictWordDistance() on PostgreSQL.
2022-06-17 11:14:30 +02:00
Mariusz Felisiak
759ff4862a
Fixed #33786 -- Confirmed support for GDAL 3.5.
2022-06-16 09:44:19 +02:00
Jonas Lundberg
e96320c917
Fixed #33755 -- Moved ASGI body-file cleanup into request class.
2022-06-09 11:11:45 +02:00
Ciaran McCormick
286e7d076c
Fixed #33764 -- Deprecated BaseUserManager.make_random_password().
2022-06-03 07:30:57 +02:00
Samir Shah
6f73eb9d90
Fixed #33742 -- Added id to GeoJSON serializer.
2022-06-01 19:11:26 +02:00
Florian Demmer
f3e2bb0833
Fixed #33750 -- Fixed timezone warning alignment with help texts.
...
Previously help_text was wrapped in a paragraph, but the change to div
broke the alignment, refs #27207 .
2022-06-01 11:41:15 +02:00
Marcelo Galigniana
8c0886b068
Fixed #22078 -- Fixed crash of Feed with decorated methods.
2022-05-26 10:39:51 +02:00
Aymeric Augustin
6485894157
Renamed wrapped functions to wrapper.
...
All these functions are wrapping another function. They're the wrapper,
while the function they're wrapping is the wrapped.
2022-05-25 10:53:52 +02:00
Sankalp
90dcf27114
Fixed #33725 -- Made hidden quick filter in admin's navigation sidebar not focusable.
...
Regression in d915dd1c58
.
Follow up to 780473d756
.
2022-05-21 13:37:53 +02:00
Mohammed Y. Alnajdi
78bf1565c3
Fixed #33727 -- Fixed color contrasts in admin header.
2022-05-21 12:35:10 +02:00
Mariusz Felisiak
981c23c0cc
Fixed #33717 -- Dropped support for PostgreSQL 11.
2022-05-19 09:26:48 +02:00
Carlton Gibson
3c6f1fd1f8
Increased the default PBKDF2 iterations for Django 4.2.
2022-05-17 14:22:06 +02:00
Mariusz Felisiak
4286378a08
Updated source translation catalogs.
...
Forward port of d1f1a0168a
from
stable/4.1.x.
2022-05-17 14:17:07 +02:00
Alokik Vijay
7f3cfaa12b
Fixed #32565 -- Moved internal URLResolver view-strings mapping to admindocs.
...
Moved the functionality of URLResolver._is_callback(),
URLResolver._callback_strs, URLPattern.lookup_str() to
django.contrib.admindocs.
2022-05-17 10:50:09 +02:00
Marcelo Galigniana
76af861356
Fixed #27550 -- Allowed GEOSGeometry.normalize() to return a normalized clone.
2022-05-16 06:46:53 +02:00
Mariusz Felisiak
02dbf1667c
Fixed #33691 -- Deprecated django.contrib.auth.hashers.CryptPasswordHasher.
2022-05-11 09:13:45 +02:00
Gagaro
667105877e
Fixed #30581 -- Added support for Meta.constraints validation.
...
Thanks Simon Charette, Keryn Knight, and Mariusz Felisiak for reviews.
2022-05-10 11:22:23 +02:00
Nikita Sobolev
21d8ea4eb3
Corrected extract_views_from_urlpatterns()'s docstring.
2022-05-06 09:50:46 +02:00
Daniel Hahler
dddc8bc47d
Fixed #33679 -- Fixed the last inline's id in admin for users without add permissions.
2022-05-06 08:36:04 +02:00
Stefan Brand
c5cc750b56
Corrected example in Polygon docstring.
2022-05-04 17:31:42 +02:00
Mariusz Felisiak
37470bbd90
Fixed #33675 -- Dropped support for PostgreSQL 10 and PostGIS 2.4.
2022-05-04 06:28:51 +02:00
Hrushikesh Vaidya
f74d4cae6d
Fixed #33667 -- Used --header-branding-color for branding headers in admin.
2022-05-03 08:29:51 +02:00
Marcelo Galigniana
27aa7035f5
Fixed #27471 -- Made admin's filter choices collapsable.
2022-04-26 08:44:31 +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
Mariusz Felisiak
eeb0bb6379
Refs #27674 --- Deprecated django.contrib.gis.admin.OpenLayersWidget.
2022-04-22 11:36:27 +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
Aymeric Augustin
903702dfb1
Removed unnecessary default argument from GET.get() call in LoginView.get_redirect_url().
...
The default argument is unnecessary because
url_has_allowed_host_and_scheme() returns False when its first argument
is "" or None, so get_redirect_url() still returns "".
This also aligns LoginView.get_redirect_url() and LogoutView.get_next_page().
2022-04-19 06:25:38 +02:00
Aymeric Augustin
5591a72571
Fixed #33648 -- Prevented extra redirect in LogoutView on invalid next page when LOGOUT_REDIRECT_URL is set.
2022-04-18 16:33:10 +02:00
Alexandru Mărășteanu
a1e4e86f92
Fixed #33607 -- Made PostgresIndex.create_sql() respect the "using" argument.
2022-04-15 22:00:28 +02:00
mgaligniana
c72f6f36c1
Fixed #11803 -- Allowed admin select widgets to display new related objects.
...
Adjusted admin javascript to add newly created related objects to
already loaded select widgets.
In this version, applies only where limit_choices_to is not set.
2022-04-15 07:46:37 +02:00
Claude Paroz
08f30d1b6a
Fixed #33637 -- Improved initial zoom level in MapWidget.
2022-04-14 11:50:31 +02:00
David Smith
6991880109
Refs #31617 -- Added an id for helptext in admin forms.
2022-04-06 12:42:43 +02:00
Baptiste Mispelon
50e1e7ef8e
Fixed #33348 -- Changed SimpleTestCase.assertFormError()/assertFormsetErrors() to take form/formset.
...
Instead of taking a response object and a context name for
the form/formset, the two methods now take the object directly.
2022-04-06 07:58:52 +02:00
Lucidiot
13a9cde133
Fixed #33613 -- Made createsuperuser detect uniqueness of USERNAME_FIELD when using Meta.constraints.
2022-04-01 11:39:41 +02:00
Luke Plant
40b8a6174f
Fixed #33397 -- Corrected resolving output_field for DateField/DateTimeField/TimeField/DurationFields.
...
This includes refactoring of CombinedExpression._resolve_output_field()
so it no longer uses the behavior inherited from Expression of guessing
same output type if argument types match, and instead we explicitly
define the output type of all supported operations.
This also makes nonsensical operations involving dates
(e.g. date + date) raise a FieldError, and adds support for
automatically inferring output_field for cases such as:
* date - date
* date + duration
* date - duration
* time + duration
* time - time
2022-03-31 11:05:23 +02:00
René Fleschenberg
eb07b5be0c
Fixed #15619 -- Deprecated log out via GET requests.
...
Thanks Florian Apolloner for the implementation idea.
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2022-03-29 06:42:14 +02:00
adontz
2bee0b4328
Fixed #7497 -- Allowed overriding the order of apps and models in admin.
2022-03-25 10:33:44 +01:00
Mariusz Felisiak
94d8ed55fa
Refs #15619 -- Logged out with POST requests in admin.
2022-03-24 17:41:53 +01:00
Carlton Gibson
bb61f0186d
Refs #32365 -- Removed internal uses of utils.timezone.utc alias.
...
Remaining test case ensures that uses of the alias are mapped
canonically by the migration writer.
2022-03-24 06:29:50 +01:00
Stefan Wehrmeyer
561761c660
Fixed #33592 -- Fixed "View on Site" links in custom admin site.
2022-03-21 10:07:32 +01:00
Florian Apolloner
4f92cf87b0
Prevented initialization of unused database connections.
2022-03-17 07:40:57 +01:00
Gagaro
4bd494db42
Made BaseConstraint importable from django.db.models.
2022-03-16 16:21:10 +01:00
Mariusz Felisiak
970f5bf503
Fixed #33577 -- Confirmed support for GDAL 3.4.
2022-03-16 09:07:01 +01:00
Mariusz Felisiak
3eaba13a47
Removed unnecessary _connector from Q construction in get_for_models().
...
Q._connector defaults to Q.AND.
Follow up to 859a87d873
.
2022-03-15 16:13:28 +01:00
Biel Frontera
859a87d873
Fixed #31357 -- Fixed get_for_models() crash for stale content types when model with the same name exists in another app.
2022-03-14 12:52:26 +01:00
Adrian Torres
d90e34c61b
Fixed #33561 -- Allowed synchronization of user attributes in RemoteUserBackend.
2022-03-10 12:57:19 +01:00
Hameed Gifford
58d357fc65
Fixed #33563 -- Fixed contenttype reverse data migration crash with a multiple databases setup.
2022-03-08 06:22:03 +01:00
Adam Johnson
b811364421
Refs #33446 -- Allowed variable whitespace in CSS source map references.
...
Follow up to dc8bb35e39
.
The Webpack default is to output CSS source map comments like
`/*# sourceMappingURL=main.css.map*/`. Also, Chromium allows tabs.
2022-03-04 06:22:28 +01:00
Mariusz Felisiak
445b075def
Fixed #33547 -- Fixed error when rendering invalid inlines with readonly fields in admin.
...
Regression in de95c82667
.
Thanks David Glenck for the report.
2022-03-01 08:09:58 +01:00
Hrushikesh Vaidya
119f227aa6
Fixed #33524 -- Allowed overriding empty_label for ForeignKey in ModelAdmin.radio_fields.
2022-02-28 13:28:21 +01:00
Dulalet
e0442a628e
Fixed #33527 -- Removed unnecessary code in ModelAdmin._changeform_view().
...
Co-authored-by: Daulet1 <d.abduali@thefactory.kz>
2022-02-26 18:07:56 +01:00
Shubh1815
11cc227344
Fixed #33267 -- Added link to related item to related widget wrapper in admin.
2022-02-25 06:33:05 +01:00
Anders Kaseorg
7f4fc5cbd4
Fixed #33539 -- Fixed spaces in WITH SQL for indexes on PostgreSQL.
2022-02-24 09:03:58 +01:00
mgaligniana
fe7dbef586
Fixed #28889 -- Prevented double submission of admin forms.
...
Added a JavaScript confirm() to catch double-submissions, when the
change form has already been submitted.
Thanks to Adam Johnson, Claude Paroz, Keryn Knight, and Thibaud Colas
for review.
2022-02-23 14:57:34 +01:00
Claude Paroz
eabc22f919
Fixed #33328 -- Transformed formset:added/removed to native JS events.
2022-02-23 10:33:07 +01:00
ravi kunwar
1f42a352e0
Fixed #33434 -- Changed font-size in admin CSS to use rem units.
2022-02-23 09:26:19 +01:00
ravi kunwar
ee13588f45
Removed unnecessary font-size in admin hr CSS.
2022-02-23 09:25:20 +01:00
My-Name-Is-Nabil
3079133c73
Fixed #33514 -- Added fallbacks to subsequent language codes in Select2 translations.
2022-02-18 08:34:49 +01:00
Baptiste Mispelon
d84cd91e90
Refs #33348 -- Improved messages raised by SimpleTestCase.assertFormError()/assertFormsetErrors().
...
This makes messages use BaseFormSet/BaseForm.__repr__() instead of
context, and adds the _assert_form_error() helper.
2022-02-15 07:15:44 +01:00
Baptiste Mispelon
9bb13def5d
Refs #33348 -- Made SimpleTestCase.assertFormsetErrors() raise an error when form_index is too big.
2022-02-14 12:46:46 +01:00
Baptiste Mispelon
7986028e3f
Refs #33348 -- Made SimpleTestCase.assertFormError()/assertFormsetErrors() raise an error for unbound forms/formsets.
2022-02-14 08:43:46 +01:00
dr-rompecabezas
e3f34b1f09
Fixed typo in django/contrib/humanize/templatetags/humanize.py comment.
2022-02-08 07:24:44 +01:00
Mariusz Felisiak
7119f40c98
Refs #33476 -- Refactored code to strictly match 88 characters line length.
2022-02-07 20:37:05 +01:00
django-bot
9c19aff7c7
Refs #33476 -- Reformatted code with Black.
2022-02-07 20:37:05 +01:00
Mariusz Felisiak
c5cd878382
Refs #33476 -- Refactored problematic code before reformatting by Black.
...
In these cases Black produces unexpected results, e.g.
def make_random_password(
self,
length=10,
allowed_chars='abcdefghjkmnpqrstuvwxyz' 'ABCDEFGHJKLMNPQRSTUVWXYZ' '23456789',
):
or
cursor.execute("""
SELECT ...
""",
[table name],
)
2022-02-03 11:20:46 +01:00
tschilling
0dcd549bbe
Fixed #30360 -- Added support for secret key rotation.
...
Thanks Florian Apolloner for the implementation idea.
Co-authored-by: Andreas Pelme <andreas@pelme.se>
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
Co-authored-by: Vuyisile Ndlovu <terrameijar@gmail.com>
2022-02-01 11:12:24 +01:00
Claude Paroz
beb7ddbcee
Updated translations from Transifex.
...
Updated Bulgarian, Czech, German, Uzbek, and Vietnamese translations.
Forwardport of 7a1c6533eb
from stable/4.0.x.
2022-01-29 19:01:15 +01:00
Mariusz Felisiak
67db54a5a7
Fixed #33452 -- Fixed admin change-form layout for submit buttons on mid-sized displays.
...
Thanks David Smith for reviews.
2022-01-29 11:59:08 +01:00
Mariusz Felisiak
2eed554c3f
Fixed wrapping of long messages in the admin.
2022-01-26 21:14:13 +01:00
Carlton Gibson
85f2a9fb0f
Fixed #33407 -- Fixed .radiolist admin CSS.
...
Regression in 5942ab5eb1
.
2022-01-26 09:26:48 +01:00
Collin Anderson
890bfa368c
Refs #20349 -- Avoided loading testing libraries when not needed.
2022-01-25 11:41:01 +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
Mariusz Felisiak
f605e85af9
Fixed #33453 -- Dropped support for GDAL 2.1.
2022-01-20 18:54:29 +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
Ayush Joshi
0a17666045
Fixed #28135 -- Made simplify_regex() handle non-capturing groups.
2022-01-14 11:01:02 +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
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
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
mgaligniana
fa235004dd
Fixed #13251 -- Made pre/post_delete signals dispatch the origin.
2022-01-11 08:06:18 +01:00
Ad Timmering
bdf3e156b4
Fixed #28628 -- Changed \d to [0-9] in regexes where appropriate.
2022-01-07 12:25:06 +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