Re: Model-level validation

2022-09-30 Thread Aaron Smith
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 model

Re: Model-level validation

2022-09-30 Thread Jörg Breitbart
@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 a

Re: Model-level validation

2022-09-30 Thread Aaron Smith
Jorg, My observations come from the real world and are not hypothetical guesses. Among the dozen of Django applications I have worked on, at 3 companies, not a single one was actually running any kind of validation. It has always been a mistake, 100% of the time, *never* the desired behavior.

RE: Model-level validation

2022-09-30 Thread Danilov Maxim
I am completely agree with Jörg. We use Model.full_clean And Model.validate_unique to check conditional constraints. It was more than enough. I've not seen any case - where I need something else. Mit freundlichen Grüßen, DI Mag. Maxim Danilov +43(681)207 447 76 ma...@wpsoft.at

Re: Model-level validation

2022-09-30 Thread Jörg Breitbart
Hi there, I dont quite understand where the sudden fuzz about this comes from. I want to point out a few things, before going down the rabbit hole of competing high level interfaces, that ValidatedModel/UnvalidatedModel would introduce: - Django offers all validation needs as building blocks

Re: Proposal: Add utility class "ClassList"

2022-09-30 Thread Jacob Rief
Hey Carlton, in my opinion, the main use case would be to improve type safety, readability and to add a utility class for 3rd party packages. Someday, Django may add type hints and then this would be really beneficial. In Django itself, the mentioned method css_classes

Re: Proposal: cacheif template tag

2022-09-30 Thread Carlton Gibson
Hey Igor, I wonder if you can achieve the same varying the timeout parameter based in user.is_authenticated? Kind Regards, Carlton On Sat, 24 Sept 2022 at 15:35, Igor Margitich wrote: > Hi django-developers, > > I would like to propose new template tag `cacheif`. Could be useful when > you ne