On Tue, Jul 15, 2008 at 12:38 PM, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > > On Tue, 2008-07-15 at 11:49 -0400, Leo Soto M. wrote: >> After fixing some corner cases of #7560[1], and realizing that it is >> too easy to write a wrong get_db_prep_lookup method (example: >> #7448[2]), I have reached the conclusion that there is no reason to >> have *two* methods for doing the python -> db conversion >> (``get_db_prep_save`` and ``get_db_prep_lookup``). Not for most of the >> fields, at least. > > I think it will take me a few days to think through all the implications > here. However, I suspect the least intrusive change is to keep > db_prep_lookup and db_prep_save, but have them call a common method > (which could be called db_prep_value if you like).
Sure, that was what I was proposing. Seems like I didn't explained myself well, but I don't want to kill Field.get_db_prep_{save,lookup}. I want to avoid overriding them in the same repetitive way on the common cases. So looks like we agree on the general idea, and I'm going to incorporate it to #7560. -- Leo Soto M. http://blog.leosoto.com --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---