Jorg,

I do not believe it violates any separation of concerns. `full_clean()` is 
already a method on the Model class itself. The Model is already where all 
validation logic lives, except for the actual *triggering* of the 
validation.

What I believe violates separation of concerns is that models do not run 
something which is already internal to itself, i.e. they are not actually 
fully functional as a data store layer, unless an external thing 
(ModelForm) is implemented. That feels wrong to me.
On Friday, September 30, 2022 at 2:19:35 PM UTC-7 j.bre...@netzkolchose.de 
wrote:

> @Aaron
>
> Oh well, if anecdotal personal evidence counts for you - here is mine:
>
> Working here since 2008 with Django in tons of projects in different 
> positions. The project sizes were from small websites to big API-driven 
> SPA cluster installations (with and w'o DRF). Ofc it is not all rainbows 
> and ponies with Django, but python-side data validation never crossed my 
> way as seriously flawed in Django. NOT EVEN ONCE. (Could list at least 
> 5-7 other topics that are somewhat tedious to get done with Django, but 
> thats offtopic here.)
>
> Plz dont jump from personal frustration about poor development processes 
> you have observed to all-conclusions, that depict most Django users as 
> total noobs. (Still funny to read, as it reminded me on those flaming 
> wars between Perl and Python folks ~18ys ago, which abruptly ended when 
> Perl6 finally made its debut.)
>
> > The question is not whether you /can/ compose validation into django
> > models. The concern is that it should be done /by default/ to protect
> > the average naive newbie developer from mistakes.
>
> I'm sorry if I didn't answer that more directly for you - nope, imho it 
> should not be done by default on `Model.save`. It violates the path in 
> separation of concerns Django has chosen with form validation, thus the 
> -1 from my side.
>
>
> Regards,
> Jörg
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/5faab961-7e4d-4714-aa78-f5fd2faa0212n%40googlegroups.com.

Reply via email to