I would hide or make the amount field read-only and set it with a
pre_save signals.
This way, you don't have to worry about it and you get the right value
every time instead of getting an error every now and then.
2017-02-04 16:32 GMT+01:00 Roberto Russi :
> I need to validate a form in the admin area checking if the SUM of 'price'
> field in inlines match whit 'amount' field in the main form.
>
> What is best way?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/da935043-5202-4a5f-aa99-b4b990559ce0%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
Cordialement, Coues Ludovic
+336 148 743 42
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/CAEuG%2BTadcER%3D5hhQy1XyJ%3DSqvxCNMRjQdVuvV7z9nPsV8xbVbg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.