On 9/9/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>
>
> On Sun, 2007-09-09 at 15:58 +0800, Russell Keith-Magee wrote:
> [...]
> > - I'm also inclined to continue the similarities, and make the
> > assertion functions members on BaseForm. This would allow a
> > significant simplification of your proposal, as the data locations
> > (i.e., self.cleaned_data) can be implied.
>
> I'm not sure I understand this. Are you proposing putting some methods
> into newforms.forms.BaseForm that only exist for supporting the test
> framework? I'm usually not in favour of that type of change because it's
> leaking stuff from the test framework, which is ideally entirely
> independent of core functionality, into the core.


It is for new forms validation and not for test.

I like the methods being part of BaseForm. We might add a different
signature or methods for automatic data location thing, where a name will be
queried upon in self.clean_data, as not all assert equals will be based on
field, and some might require further processing before comparison.

Drawback if most of the times we are not using that feature, each validation
statement will have to contain a superfluous self. in the beginning. Whereas
helper functions can all be imported in the name space. Its only minor
syntactic sugar so to say, that we are after with this.

-- 
Amit Upadhyay
Vakow! www.vakow.com
+91-9820-295-512

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to