Am 13.03.2006 um 08:00 schrieb Adrian Holovaty: [snip] > Thoughts, criticisms? The only part I'm sketchy on is the side effect > of converting the values to their Python data types. The > cleanliness/consistency is quite nice, but it's slightly not something > a developer might expect. However, we can solve the latter through > clear documentation.
IMHO automatic conversion from strings to python types shouldn't be in the model layer. Model fields should expect to get a compatible type (at least directly castable to the target type, such as int (floatnum) or str(intnum)). I could even imagine a DateTimeField accepting a timestamp or time tuple... but parsing out the date from a string seems like a step too far. The form/manipulator should be doing that kind of conversion. Also, the names validate() and validate_full() had me confused for a bit until I read the code. IIUC, validate() is the internal interface for subclasses, while validate_full() is the external interface invoked by the Model class. But that's rather non-obvious from the names ;-) Cheers, Chris -- Christopher Lenz cmlenz at gmx.de http://www.cmlenz.net/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers -~----------~----~----~----~------~----~------~--~---