On Sun, 2006-07-16 at 17:46 -0400, Todd O'Bryan wrote:
> Is there any way to specify a user-friendly name for fields when  
> creating a Form object?
> 
> I have a change password view, and right now I'm getting error  
> messages like
> 
> This field must match the 'new_password' field.
> 
> Obviously, I'd prefer something like the field's label, rather than  
> the field_name I've provided.

The label is not specified at all at that level. It is something you
just put in the template. So that matching is not going to happen
automatically.

Fortunately, you can pass in an error_message parameter to any
validator. It sounds like you have a line somewhere that is like


        ..., validator_list = [AlwaysMatchesOtherField('new_password')]
        
Pass in your error message as the second parameter there.

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to