On 05/15/2011 08:03 PM, Daniel França wrote:
I don't know if I understood, but the example you posted is about forms,
right?
That's the point, I don't wanna need to write forms to modify error
messages.
Yeah, it looks like the link I posted was about forms. I got a bit
turned around after looking at the code for the field class:
http://code.djangoproject.com/browser/django/trunk/django/db/models/fields/__init__.py
If you look there you'll see that there's a default_error_messages
property of the Field base class that's inherited by all of your fields.
It's not clear to me from that code how you should be overriding your
field, or whether you can do it from a standard model declaration, but
play with that. If you don't get it working then re-post asking for
specifics based on what you find. Or maybe some knowledgeable person
will read my half-baked info here and jump in with exactly what you need.
Shawn
--
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.