The test failures on the CI would suggest that overriding
`get_db_prep_lookup` is a problem!

There are changes on my ranges branch which move the % sign addition out of
`Field.get_db_prep_lookup` and into the relevant lookup. This makes
overriding certain lookups (e.g. contains, startswith etc) much cleaner for
field types where that name makes sense but it does not mean text. You can
see those here:
https://github.com/mjtamlyn/django/commit/3c45e2cfecbc2c8da6e4a05c5db3367c5cabfde7

I've commented on the PR with more details.

On 15 November 2014 23:06, Shai Berger <[email protected]> wrote:

> On Sunday 16 November 2014 00:46:43 Josh Smeaton wrote:
> > Clever. I don't mind this approach at all. Will the overriding of
> > get_db_prep_lookup interfere with other implementations though?
> >
>
> Yes, it probably would. It is there because the default one for the lookup
> adds % signs around the value, which I didn't want; and within the evening
> I
> couldn't find the clean way to get rid of that [in retrospect, I think I
> need
> to invoke the grand-grand-parent -- super(BuiltinLookup,
> self).process_rhs()]
>
> Shai.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers  (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/201411160106.16550.shai%40platonix.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAMwjO1HWBmf_EdKuZQUJ8WW_MLavwSd5R6uZ-3PJMxErKDjgJg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to