Re: Customizing error message for unique ModelForm field

2009-11-05 Thread Karen Tracey
On Thu, Nov 5, 2009 at 5:46 PM, aa56280 wrote: > > Also, I'd like to customize the error returned when someone tries to > save the slug with invalid characters, such as spaces. That one > currently says "Enter a valid 'slug' consisting of letters, numbers, > underscores or hyphens." The terms slu

Re: Customizing error message for unique ModelForm field

2009-11-05 Thread Karen Tracey
On Thu, Nov 5, 2009 at 5:38 PM, aa56280 wrote: > > I have a ModelForm with a slug field with unique=True. I need to make > the error message a bit more "friendly." Is there a way to override > the default error message? The default is: "[model_name] with this > [field_label] already exists." > >

Re: Customizing error message for unique ModelForm field

2009-11-05 Thread aa56280
Also, I'd like to customize the error returned when someone tries to save the slug with invalid characters, such as spaces. That one currently says "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens." The terms slug doesn't make sense to some of my users. On Nov 5, 4:38 

Customizing error message for unique ModelForm field

2009-11-05 Thread aa56280
I have a ModelForm with a slug field with unique=True. I need to make the error message a bit more "friendly." Is there a way to override the default error message? The default is: "[model_name] with this [field_label] already exists." --~--~-~--~~~---~--~~ You rece