On Saturday, October 7, 2017 at 5:07:31 PM UTC+2, Todor Velichkov wrote:
>
> I believe this could save a lot of headache to people. If there is no 
> guarantee that an instance cannot be saved after the form has been 
> validated, then do not give me an option to shoot myself into the foot.
>

Even if the whole instance were validated there is __never__ and can 
__never__ be any guarantee that the instance can actually be saved.


> My only concern here actually is not that we didn't know what will happen 
> (I think we know that), but how to show the user that the developer got 
> messed up, i.e. how to render an error for a field that is not rendered to 
> the user? Should this error be propagated to a NON-FIELD error or something 
> else?
>

Showing an error message which the user cannot correct because the field is 
not in the form is horrible UX.

I feel its perfectly fine to ask for a complete model instance at this 
> stage of the validation process (lots of methods got passed from the 
> beginning - form.clean() and instance.clean()).
>

I strongly disagree, especially for values which are set programmatically 
after validation (with the use of save(commit=False)) depending on values 
the user chose. Ie when the user chooses a category for a bug report and 
the code then automatically assigns another user as owner of that 
reuqest/ticket.

Cheers,
Florian

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/ac3fa5b6-ee22-465b-9cda-22387c547838%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to