On Mon, 2007-08-13 at 18:18 -0700, sime wrote:
> Another one --
> 
> 6. Maybe allow clean_method=x in field parameters, rather than have to
> create a custom field or repeat similar clean functions.

You can do that one in this fashion...

        class MyForm(Form)
           field1 = ...
           field2 = ...
        
           def generic_clean(self):
              # ...
        
           clean_field1 = generic_clean
           clean_field2 = generic_clean
        
The generic_clean method can even be outside the class (although it will
be called as a method function, so it needs to have the right
signature).

> 
> > 5. (Somewhat pedantic) Rename data[] to raw_data[] and
> cleaned_data[]
> > to data[] - Has anyone seen how unnecessarily ugly this can get?
> 
> Sorry I take this one back - guess it's a bit late now! The last
> renaming was hassle enough.

Ignore my response to it in the reply I sent before this arrived,
then. :-)

Regards,
Malcolm

-- 
Experience is something you don't get until just after you need it. 
http://www.pointy-stick.com/blog/


--~--~---------~--~----~------------~-------~--~----~
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