# Django CIText
PostgreSQL CIText integration for Django.
[](https://pypi.python.org/pypi/django-citext/)
[](https://codecov.io/gh/voiio/django-citext)
[](https://raw.githubusercontent.com/voiio/django-citext/main/LICENSE)
## Setup
```ShellSession
python3 -m pip install django-citext
```
```python
# settings.py
INSTALLED_APPS = [
'citext',
# ...
]
```
## Usage
```python
# myapp/models.py
from django.db import models
from citext import CITextField, CIEmailField
class MyModel(models.Model):
name = CITextField()
email = CIEmailField(unique=True)
```
```python
# 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.
Raw data
{
"_id": null,
"home_page": null,
"name": "django-citext",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "PostgreSQL, Django, CITEXT, Case Insensitive, postgres",
"author": null,
"author_email": "Johannes Maron <johannes@maron.family>, J\u00f6rg Benesch <benesch.joerg@gmail.com>, Rust Saiargaliev <fly.amureki@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/e1/9b/adbf990e70b4187b97428114a355684a693177506167e1d99499391264f1/django_citext-1.0.2.tar.gz",
"platform": null,
"description": "# Django CIText\n\nPostgreSQL CIText integration for Django.\n\n[](https://pypi.python.org/pypi/django-citext/)\n[](https://codecov.io/gh/voiio/django-citext)\n[](https://raw.githubusercontent.com/voiio/django-citext/main/LICENSE)\n\n## Setup\n\n```ShellSession\npython3 -m pip install django-citext\n```\n\n```python\n# settings.py\nINSTALLED_APPS = [\n 'citext',\n # ...\n]\n```\n\n## Usage\n\n```python\n# myapp/models.py\nfrom django.db import models\nfrom citext import CITextField, CIEmailField\n\n\nclass MyModel(models.Model):\n name = CITextField()\n email = CIEmailField(unique=True)\n```\n\n```python\n# myapp/views.py\nfrom django.http import HttpResponse, HttpResponseNotFound\n\nfrom . import models\n\n\ndef my_view(request, email):\n try:\n my_model = models.MyModel.objects.get(email=email)\n except models.MyModel.DoesNotExist:\n return HttpResponseNotFound()\n return HttpResponse(my_model.name)\n```\n\n## Credits\n\nProject is based on the Django's own CIText implementation,\nwhich was removed in Django 5.0. Big thanks to the Django contributors\nfor their excellent work.\n\n",
"bugtrack_url": null,
"license": null,
"summary": "PostgreSQL CIText integration for Django.",
"version": "1.0.2",
"project_urls": {
"Changelog": "https://github.com/voiio/django-citext/releases",
"Project-URL": "https://github.com/voiio/django-citext"
},
"split_keywords": [
"postgresql",
" django",
" citext",
" case insensitive",
" postgres"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f25db65566a8b514441540b6a9c9ebaa39da7d5c9e2609d3d155bbf457abe4a7",
"md5": "fbe04b2da2bcd4ca26ebb8e6a704fd06",
"sha256": "6ae71eb36442a61f1b2df5355c8ead9722b283a7b726cdfabcf0ff873a6b7613"
},
"downloads": -1,
"filename": "django_citext-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fbe04b2da2bcd4ca26ebb8e6a704fd06",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 5155,
"upload_time": "2024-08-30T11:12:49",
"upload_time_iso_8601": "2024-08-30T11:12:49.660982Z",
"url": "https://files.pythonhosted.org/packages/f2/5d/b65566a8b514441540b6a9c9ebaa39da7d5c9e2609d3d155bbf457abe4a7/django_citext-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e19badbf990e70b4187b97428114a355684a693177506167e1d99499391264f1",
"md5": "f731e2d5b12d12d99febf8d91dbf91e5",
"sha256": "375a2d6a06133ad9e375f0db62d4d606fa43428de14751d03856b9c702c0000f"
},
"downloads": -1,
"filename": "django_citext-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "f731e2d5b12d12d99febf8d91dbf91e5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 4124,
"upload_time": "2024-08-30T11:12:50",
"upload_time_iso_8601": "2024-08-30T11:12:50.922341Z",
"url": "https://files.pythonhosted.org/packages/e1/9b/adbf990e70b4187b97428114a355684a693177506167e1d99499391264f1/django_citext-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-30 11:12:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "voiio",
"github_project": "django-citext",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "django-citext"
}