Code Monkey home page Code Monkey logo

Comments (2)

miki725 avatar miki725 commented on June 14, 2024

CallableFilter overwrites lookups:

@cached_property
def lookups(self):
"""
Get all supported lookups for the filter
This property is identical to the super implementation except it also
finds all custom lookups from the class methods and adds them to the
set of supported lookups as returned by the super implementation.
"""
lookups = super(CallableFilter, self).lookups
r = LOOKUP_CALLABLE_FROM_METHOD_REGEX
custom_lookups = {
m.groupdict()['filter'] for m in (r.match(i) for i in dir(self))
if m and m.groupdict()['backend'] == self.root.filter_backend.name
}
return lookups | custom_lookups

sounds like a bug. dont remember if there was any reason for returning all lookups for CallableFilter

from django-url-filter.

eralumin avatar eralumin commented on June 14, 2024

Maybe for fields that need some lookups created or overloaded?

I'm not sure it's a bug, maybe we should just automatically detect the field isinstance of Field?

Thanks for your quick reply!

from django-url-filter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.