#24639: Interaction between ValidationError and mark_safe ----------------------------+-------------------------------------- Reporter: jambonrose | Owner: jambonrose Type: Bug | Status: closed Component: Forms | Version: 1.8 Severity: Normal | Resolution: wontfix Keywords: | Triage Stage: Accepted Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 ----------------------------+-------------------------------------- Changes (by timgraham):
* status: new => closed * resolution: => wontfix Comment: From Loic on the pull request: IMO ValidationError should be HTML agnostic since it's the responsibility of ErrorList/Dict to deal with the interaction with HTML. This also seems pretty fragile, potentially unused params dictate the final outcome and so do safe params such as int and float. HTML in Python code is not something we want to promote anyway (HTML belongs in templates). The logic behind using params is to make things as atomic as possible to give more flexibility to the user of the form. If you are going to couple two different technologies, you might as well interpolate the final message yourself. [[BR]][[BR]] If we really wanted to deal with interpolation/formatting of SafeData it should be addressed using `__format__` and `__mod__` on the SafeData object itself. -- Ticket URL: <https://code.djangoproject.com/ticket/24639#comment:4> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.37015a5f680ff6fb6f5dbd2d01c8cf48%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.