Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to do custom searches #4

Closed
wants to merge 1 commit into from

Conversation

holvianssi
Copy link

The idea comes in two parts. First, introduce DjangoQLField object, which represents a searchable field. By default this is a model field, but as the added tests show, this can also be something that doesn't exist on the model.

The second part is that DjangoQLField has method add_search_target() which allows one to do custom annotation on the queryset. When there exists an annotation, it's then possible to just use ordinary .filter() on the queryset.

This is related to issue #3

@stebunovd stebunovd closed this Apr 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants