newforms.ValidationError cannot accept a message created by ugettext_lazy
Currently, if ugettext_lazy is used on the error message passed to the newforms ValidationError it will raise AssertionError because the message is expected to be either a list or a basestring. The assertion should instead allow for an instance of django.utils.functional.Promise (as the oldforms ValidationError already does).
Attachments
(1)
- 5370.diff
(860 bytes
) - added by James Bennett 18 years ago.
- Patch which allows basestring or Promise
Download all attachments as:
.zip
Change History
(6)
| Triage Stage: |
Unreviewed → Ready for checkin
|
| Summary: |
newforms.ValidationError cannot be accept a message created by ugettext_lazy → newforms.ValidationError cannot accept a message created by ugettext_lazy
|
| Resolution: |
→ fixed
|
| Status: |
new → closed
|
Patch which allows basestring or Promise