Opened 17 years ago

Closed 17 years ago

#4904 closed (duplicate)

newforms.ValidationError doesn't accept translated strings

Reported by: Thomas Steinacher <tom@…> Owned by: nobody
Component: Forms Version: dev
Severity: Keywords:
Cc: djoume@… Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

>>> from django.utils.translation import ugettext_lazy as _
>>> from django.newforms import ValidationError
>>> ValidationError(_(u'Hello'))
Traceback (most recent call last):
  File "<console>", line 1, in ?
  File "/home/tom/django/django/newforms/util.py", line 50, in __init__
    assert isinstance(message, basestring), ("%s should be a basestring" % repr(message))
AssertionError: <django.utils.functional.__proxy__ object at 0xb760a4ec> should be a basestring
>>>

Attachments (1)

newforms.diff (535 bytes ) - added by Thomas Steinacher <tom@…> 17 years ago.
let's just remove the assertion

Download all attachments as: .zip

Change History (5)

comment:1 by anonymous, 17 years ago

Cc: djoume@… added

by Thomas Steinacher <tom@…>, 17 years ago

Attachment: newforms.diff added

let's just remove the assertion

comment:2 by Thomas Steinacher <tom@…>, 17 years ago

Has patch: set

comment:3 by anonymous, 17 years ago

Any update on this?

comment:4 by Thomas Steinacher <tom@…>, 17 years ago

Resolution: duplicate
Status: newclosed

Looks like #5370 has a slightly better patch.

Note: See TracTickets for help on using tickets.
Back to Top