Hi Luke,

On 05/01/2013 04:31 PM, Luke Plant wrote:
> Can I get some feedback on what to do about ticket 19445?
> 
> https://code.djangoproject.com/ticket/19445
> 
> I have re-opened this ticket because I don't think it was addressed
> satisfactorily. I apologise in advance that this is a bit involved!
> 
> The fundamental problem is that the validation routines attempt to do
> static validation of a ModelAdmin class, but ModelAdmin has gained
> methods that mean that many of the things that we want to validate are
> only generated at run time (by which I mean the point when a request is
> received).
> 
> So ModelAdmin.get_form() is the method used to create a form class, but
> the validation routines want to validate ModelAdmin.form . Even without
> subclassing ModelAdmin.get_form(), it's possible to create a form class
> that will not pass validation, but will work fine in practice (see
> ticket for more details).

I agree with you that we should simply remove unreliable static
validation for things that are not actually static, rather than
introducing ever-more-complex (and in this case, incorrect) heuristics
to guess whether static validation will work.

It would be great to enumerate some common mistakes that the static
validation we're removing was supposed to catch, and see in how many of
those cases we can provide a similarly-helpful error at runtime
(hopefully with no performance cost in the non-error case).

Carl

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" 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 http://groups.google.com/group/django-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to