Skip to main content

Django application that provider like and ilike lookup in the querysets

Project description

Django Like

Information

Django Like is a Django application that adds other useful fields.

It is distributed under the terms of the GNU Lesser General Public License <http://www.gnu.org/licenses/lgpl.html>

Requeriments

Django 1.1 (or higher). It’s possible that works with other versions lower 1.1

Installation

In your settings.py

INSTALLED_APPS = (

    'django_like',

)

Or apply the next Patch (This is not neccesary, you can install the app)

Usage

Anything that you can to do with like sentence in SQL

MyModel.objects.filter(field_name__like='xx%YY%zz')
MyModel.objects.filter(field_name__ilike='xx%yy%zz')
User.objects.filter(username__like='a%in')

It is more quick that something like this, and more readable:

MyModel.objects.filter(field_name__regex='^xx.*YY.*zz$')

This app provider two new lookups: like and ilike.

Now you can compare the time it takes to run the same query, many times, with like and with regex

python manage.py benchmark_like

Reported

Development

You can get the leading edge version of django-like by doing a checkout of its repository:

https://github.com/goinnn/django-like

0.0.3 (2012-02-14)

  • Fix a broken link in the readme

0.0.2 (2012-02-13)

  • Add benchmark command

0.0.1 (2011-12-28)

  • First version to django-like

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-0.0.3.tar.gz (4.2 kB view details)

Uploaded Source

File details

Details for the file django-like-0.0.3.tar.gz.

File metadata

  • Download URL: django-like-0.0.3.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-like-0.0.3.tar.gz
Algorithm Hash digest
SHA256 97fb0ebc5c23badf8c99da83b328763b22869073c0416d7d78742dff25680375
MD5 ec8cc579a0f418e76f0520aafad0c8cc
BLAKE2b-256 cc7c6b034d4939e079fee641195cc89284dea43b497f3104bbf481597ba3d5f2

See more details on using hashes here.

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