Django lookup extensions
Django lookup extensions use NOT query.
Free software: MIT license
Documentation: https://django-lookup-extensions.readthedocs.io.
Installation
To install Django lookup extensions, run this command in your terminal:
$ pip install django-lookup-extensions
This is the preferred method to install Django lookup extensions, as it will always install the most recent stable release.
If you don’t have pip installed, this Python installation guide can guide you through the process.
Usage
Setup
Add ‘lookup_extensions’ to your INSTALLED_APPS setting.:
INSTALLED_APPS = [
...
'lookup_extensions',
...
]
AppConfig.ready imports lookups and register them using django.db.models.fields.Field.register_lookup.
Making queries
Use lookup like Django standard lookups.
ModelA.objects.filter(name__neexact='test name')
Supported lookup types
Negaetes
neexact is negate exact, neiexact is negate iexact, others are similar.
neexact
neiexact
necontains
neicontains
nestartswith
neendswith
neistartswith
neiendswith
neregex
neiregex
Complement
complement
Extra regexes
These regex lookups support metacharacters \d, \D, w, \W, \s, \S.
MySQL, PostgreSQL and Redshift also support \<, \>.
Prefix follows the previous section.
exregex
exiregex
neexregex
neexiregex
Supported vendor types
MySQL
PostgreSQL
sqlite
lookups using LIKE aren’t case sensitive.
necontains
nestartswith
neendswith
Redshift
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.2.1
Support related complement lookups
0.2.0
Add support for Django 2.1
Add support for Python 3.7
Migrate to complement from exists and neexists
0.1.0
Migrate installation to backend settings
Support exists and neexists lookups
0.0.1 - 0.0.2
Support extra regex lookups
Support negaete lookups
Metadata
Release files for django-lookup-extensions 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-lookup-extensions-0.2.1.tar.gz | 19.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_lookup_extensions-0.2.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 39.9 kB
Release files / django-lookup-extensions-0.2.1.tar.gz
| Download URL | django-lookup-extensions-0.2.1.tar.gz |
|---|---|
| Size | 19.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
978c5f045c3313e2cba58fd945b1d43d4c071f6d4a8e81f26b3265a62998c0a4
|
|
BLAKE2b-256 checksum How to use checksums |
ea519f2397d82e1694444beee76b034c68933d063aba140e6a8119c34f62abfc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0
|
Release files / django_lookup_extensions-0.2.1-py2.py3-none-any.whl
| Download URL | django_lookup_extensions-0.2.1-py2.py3-none-any.whl |
|---|---|
| Size | 20.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
5818cf78a6579483939b16acb73982cd0ff5e1b82db01d7cf02481fd59d84719
|
|
BLAKE2b-256 checksum How to use checksums |
e77c1617ef7336b9e5b1db71766bfb8fc8ae186da0c8cb92c85a6dd3b9a62bf3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0
|