I don't think requiring every Django project to rewrite their views from:

if form.is_valid():

to 

form.validate()
if form.is_valid:

is practical.

About changing form.errors not to validate the form, I'm not sure there's 
much benefit there either. When writing tests, I often write: 
self.assertEqual(form.errors, {...}) without calling is_valid().

On Tuesday, October 11, 2016 at 11:58:50 AM UTC-4, ludovic coues wrote:
>
> If we choose to move the call to full_clean from errors to is_valid 
> with a deprecation period, maybe we could rename is_valid to validate. 
> is_valid could be kept  as a property, raising error if called before 
> validate like error would be after the change. 
>
> 2016-10-11 17:50 GMT+02:00 Aymeric Augustin 
> <aymeric....@polytechnique.org <javascript:>>: 
> > On 11 Oct 2016, at 14:52, Sven R. Kunze <srk...@gmail.com <javascript:>> 
> wrote: 
> > 
> > I did never say "let's do business logic in templates". AFAIK, 
> displaying 
> > errors (or preparing for it HTML-structure-wise) requires knowing 
> whether a 
> > form is invalid or not. 
> > 
> > 
> > The API for displaying errors is form.errors. 
> > 
> > If the documentation implies otherwise, please accept my apologies! 
> > 
> > -- 
> > Aymeric. 
> > 
> > -- 
> > 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-develop...@googlegroups.com <javascript:>. 
> > To post to this group, send email to django-d...@googlegroups.com 
> <javascript:>. 
> > 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/810B668F-D4D3-4C39-90CF-7357DF029921%40polytechnique.org.
>  
>
> > 
> > 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 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/e9660388-1ea1-4c6a-9de6-12ef392eab91%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to