Skip to main content

PostgreSQL CIText integration for Django.

Project description

Django CIText

PostgreSQL CIText integration for Django.

PyPi Version Test Coverage GitHub License

Setup

python3 -m pip install django-citext
# settings.py
INSTALLED_APPS = [
    "citext",
    # ...
]

Usage

# myapp/models.py
from django.db import models
from citext import CITextField, CIEmailField


class MyModel(models.Model):
    name = CITextField()
    email = CIEmailField(unique=True)
# myapp/views.py
from django.http import HttpResponse, HttpResponseNotFound

from . import models


def my_view(request, email):
    try:
        my_model = models.MyModel.objects.get(email=email)
    except models.MyModel.DoesNotExist:
        return HttpResponseNotFound()
    return HttpResponse(my_model.name)

Credits

Project is based on the Django's own CIText implementation, which was removed in Django 5.0. Big thanks to the Django contributors for their excellent work.

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_citext-1.0.3.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_citext-1.0.3-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file django_citext-1.0.3.tar.gz.

File metadata

  • Download URL: django_citext-1.0.3.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for django_citext-1.0.3.tar.gz
Algorithm Hash digest
SHA256 aaec55853c84cd48de1668fb059acba98bef4e343a4420b0e670773498e0aedd
MD5 60ef087891f60a161237e59df647958d
BLAKE2b-256 6a63dcb42e0b4c8b61f0d6da2145ec853893565d75660d6c99357a19e49f2ba4

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_citext-1.0.3.tar.gz:

Publisher: release.yml on voiio/django-citext

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_citext-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: django_citext-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for django_citext-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 30167d71369438ee27b76643466cf0d35a9dad43b3f4c8d1924efd9ba2f88dcd
MD5 7f5fdf9cec08a1c874f5f87b5a932ef8
BLAKE2b-256 d2b282162fd3270def4b8f79e752e6bafe22815fe70c07b29a245b6a2a752f7e

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_citext-1.0.3-py3-none-any.whl:

Publisher: release.yml on voiio/django-citext

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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