Skip to main content

PostgreSQL LIKE lookup functionality for Django. Django does contain __startswith, __endswith and __contains lookups, but all of them does escape "%" and "_" wildcard characters. The `__like` lookup is often faster, than the `__regex` lookup, so it can be used in cases when conditions are simple enough.

Project description

https://badge.fury.io/py/django-like-lookup.svg https://travis-ci.org/PetrDlouhy/django-like-lookup.svg?branch=master https://codecov.io/gh/PetrDlouhy/django-like-lookup/branch/master/graph/badge.svg

PostgreSQL LIKE lookup functionality for Django. Django does contain __startswith, __endswith and __contains lookups, but all of them does escape “%” and “_” wildcard characters. The __like lookup is often faster, than the __regex lookup, so it can be used in cases when conditions are simple enough.

Documentation

The full documentation is at https://django-like-lookup.readthedocs.io.

Quickstart

Install Django like lookup:

pip install django-like-lookup

Add it to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'like_lookup',
    ...
)

Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox

Credits

Tools used in rendering this package:

History

0.1.0 (2020-01-29)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-like-lookup-0.1.1.tar.gz (16.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page