Re: how to display an error

2007-08-09 Thread Collin Grady
You cannot do that from save() - you need to add a validator for the admin forms to use, using the validator_list attribute for a field. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: how to display an error

2007-08-09 Thread Ramiro Morales
On 8/9/07, Lic. José M. Rodriguez Bacallao <[EMAIL PROTECTED]> wrote: > if I have a model with save method overrided to check if some values in my > model are ok, how can I display the field(s) with errors in red in admin > like django admin does when an error occur with that field(s)? > This is

Re: how to display an error

2007-08-09 Thread Lic. José M. Rodriguez Bacallao
I think U don't understand the question. What I want is in admin interface, displey the row representing a field with and error in red like ther other normal fields in django, right now I'm checking if the field has errors in the save() method of my model. On 8/9/07, Grupo Django <[EMAIL PROTECTED

Re: how to display an error

2007-08-09 Thread Grupo Django
You can use the shell. Run python manage.py shell within your project path. Import your model: from app.models import foo f = foo( bar=2 ) f.save() now you can check all the variables you want. f.id returns the id of the new created object. On Aug 9, 1:29 pm, "Lic. José M. Rodriguez Bacallao" <

how to display an error

2007-08-09 Thread Lic. José M. Rodriguez Bacallao
if I have a model with save method overrided to check if some values in my model are ok, how can I display the field(s) with errors in red in admin like django admin does when an error occur with that field(s)? -- Lic. José M. Rodriguez Bacallao Cupet -