Strong 1+

It doesn't seem that the core team is interested in working on Model
validation at the moment: http://code.djangoproject.com/ticket/13121
(my failed ticket)

The current thinking by the powers that be is that you cannot
introduce model-level validation enforcement without breaking the API
for existing users. This is simply not true.

With ValidationError propagating upwards from the model level,
ModelForm would need nothing to do with validation besides displaying
the errors to the user. This is the common sense approach to
ModelForms anyway, and the only people who would suffer from this
migration would be those who have hacked the core from within their
code (re-writing methods in their subclasses that shouldn't typically
be re-written).

If this were the case, you could build all of your data logic into the
Model and then an RPC API, a view, or the built-in Admin would all be
very DRY and work identically when using your model. Instead you have
to rewrite code all over the place and you cannot even abstract
correctly as their are too many leaks into the view layer (see
http://www.joelonsoftware.com/articles/LeakyAbstractions.html).

Michael

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to