mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #35648 -- Raised NotImplementedError in SafeString.__add__ for non-string RHS.
This change ensures SafeString addition operations handle non-string RHS properly, allowing them to implement __radd__ for better compatibility.
This commit is contained in:
committed by
nessita
parent
b5c048f5ec
commit
d84200e4eb
@@ -262,7 +262,10 @@ URLs
|
||||
Utilities
|
||||
~~~~~~~~~
|
||||
|
||||
* ...
|
||||
* :class:`~django.utils.safestring.SafeString` now raises
|
||||
:exc:`NotImplementedError` in ``__add__`` for non-string right-hand side
|
||||
values. This aligns with the :py:class:`str` addition behavior and allows
|
||||
``__radd__`` to be used if available.
|
||||
|
||||
Validators
|
||||
~~~~~~~~~~
|
||||
|
||||
Reference in New Issue
Block a user