Re: Finalizing model-validation: ComplexValidator

2010-01-04 Thread mrts
Malcolm had some good comments when all of this was discussed previously: http://groups.google.com/group/django-developers/browse_thread/thread/436307e426844ae0/f2fa0647b97569ad He also seemed to have further ideas and code, perhaps he can be pinged for sharing them. Best, MS -- You received t

Re: Finalizing model-validation: ComplexValidator

2010-01-03 Thread Alex Gaynor
On Sun, Jan 3, 2010 at 7:50 PM, Joseph Kocherhans wrote: > On Sun, Jan 3, 2010 at 7:34 PM, Alex Gaynor wrote: >> >> What if we had some sort of wrapper class for objs, it could overide >> __getattribute__ to return either an attr if it's an obj, or a >> subscript if it's a datadict.  it seems to

Re: Finalizing model-validation: ComplexValidator

2010-01-03 Thread Joseph Kocherhans
On Sun, Jan 3, 2010 at 7:34 PM, Alex Gaynor wrote: > > What if we had some sort of wrapper class for objs, it could overide > __getattribute__ to return either an attr if it's an obj, or a > subscript if it's a datadict.  it seems to me this would solve both > concerns? I was thinking along simil

Re: Finalizing model-validation: ComplexValidator

2010-01-03 Thread Alex Gaynor
On Sun, Jan 3, 2010 at 7:31 PM, Honza Král wrote: > Hi everybody, > > > On Fri, Jan 1, 2010 at 10:30 PM, Joseph Kocherhans > wrote: > >> The ComplexValidator doesn't know in advance if it's going to be used >> for model validation or form validation. ComplexValidator's get_value >> method is mea

Re: Finalizing model-validation: ComplexValidator

2010-01-03 Thread Honza Král
Hi everybody, On Fri, Jan 1, 2010 at 10:30 PM, Joseph Kocherhans wrote: > The ComplexValidator doesn't know in advance if it's going to be used > for model validation or form validation. ComplexValidator's get_value > method is meant to help with this situation, but it needs to take > *both* th

Re: Finalizing model-validation: ComplexValidator

2010-01-03 Thread Joseph Kocherhans
On Sat, Jan 2, 2010 at 4:34 PM, Sean Bleier wrote: > > As for the timeline, I think that if complex validators are left as-is > then of course it isn't a deal breaker for inclusion to trunk before > the major feature freeze on January 5th.  However, If complex > validators need to be reworked a li

Re: Finalizing model-validation: ComplexValidator

2010-01-02 Thread Sean Bleier
Honza and Joseph (and others), thanks for all your work on this. It seems to me that we are unnecessarily tying complex validators to model fields. I would rather like to see complex validators tied to the model as a Meta option since all the fields are in the validator's domain. This would get

Finalizing model-validation: ComplexValidator

2010-01-01 Thread Joseph Kocherhans
Model validation is just about ready to go. I have one small issue with it, namely with ComplexValidator, which I'll describe below, but I think we can resolve it fairly easily. Here's a bit of background. Sorry if you're already familiar with the branch. Validators are functions that are tied to