I'm raising an error in one of my model save forms and it's not converting
the translation string to unicode. If I first pass it into the unicode()
function it works though. The following is the pertinent portions of my
model class.
class Matriz(modelUtils.MyModelAudit):

    ULTIMOANO_MISSING_ERROR = _("You need to provided an ending year for a
nulled property.")

    def save(self, force_insert=False, force_update=False):
        if self.Anular and not self.UltimoAno:
            raise ValidationError(unicode(self.ULTIMOANO_MISSING_ERROR))
        super(Matriz, self).save(force_insert, force_update)

Without the call to unicode() here I recieve the following:
<django.utils.functional.__proxy__ object at 0x0143DDF0>

I used a class property because I use the string in my form validation as
well and it works just fine there.

Is this a bug or am I doing something wrong?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to