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 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?hl=en
-~--~~~~--~~--~--~---



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]> wrote:
>
>
> 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"
> <[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)?
> >
> > --
> > Lic. José M. Rodriguez Bacallao
> > Cupet
> > -
> > Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo
> > mismo.
> >
> > Recuerda: El arca de Noe fue construida por aficionados, el titanic por
> > profesionales
> > -
>
>
> >
>


-- 
Lic. José M. Rodriguez Bacallao
Cupet
-
Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo
mismo.

Recuerda: El arca de Noe fue construida por aficionados, el titanic por
profesionales
-

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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"
<[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)?
>
> --
> Lic. José M. Rodriguez Bacallao
> Cupet
> -
> Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo
> mismo.
>
> Recuerda: El arca de Noe fue construida por aficionados, el titanic por
> profesionales
> -


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---