{ "info": { "author": "Anshul Chhangani", "author_email": "anshul.chhangani@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django :: 1.10", "Framework :: Django :: 1.11", "Framework :: Django :: 1.7", "Framework :: Django :: 1.8", "Framework :: Django :: 1.9", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Topic :: Database", "Topic :: Internet :: WWW/HTTP" ], "description": "django-custom-indexes\n=====================\n\nDjango PostgreSQL backend and custom fields to create custom indexes.\n\nWith this, indexes can be defined for a model using field attributes\nwhich will be migrated to the db, this eliminates the need to write\nmigrations manually with RunSQL to create indexes.\n\nInstallation\n============\n\n[![](https://img.shields.io/pypi/v/django-custom-indexes.svg)](https://pypi.org/project/django-custom-indexes/) ![](https://img.shields.io/badge/Maintained-yes-green.svg)\n![](https://img.shields.io/pypi/djversions/django-custom-indexes.svg) ![](https://img.shields.io/pypi/pyversions/django-custom-indexes.svg)\nInstallation:\n\n\n pip install django-custom-indexes\n\nPyPI: https://pypi.python.org/pypi/django-custom-indexes/\n\nAdd ``django_custom_indexes`` to your ``INSTALLED_APPS``:\n\n\n INSTALLED_APPS = (\n '...',\n 'django_custom_indexes'\n )\n\nRequirements:\n\n- Django 1.7 to 1.11 (not tested for 2.0+).\n- PostgreSQL database backend.\n- Python 2.7\n\nUsage\n=====\n\nCreating Indexes in PostgresSQL:\nhttps://www.postgresql.org/docs/9.5/static/sql-createindex.html\n\nIn your settings update the ``ENGINE`` parameter of ``DATABASES`` to\n``'django_custom_indexes.backends.postgresql_psycopg2'``\n\nBy default custom\\_indexes backend inherits from\ndjango.db.backends.postgresql\\_psycopg2, to use some other sub class of\npostgresql\\_psycopg2 add the following setting:\n\n``DJANGO_CUSTOM_INDEXES_BASE_ENGINE``\n\nExample Usage:\n\n\n from django_custom_indexes import model_fields\n from django.db import models\n\n\n class MyModel(models.Model):\n my_field1 = model_fields.CustomCharField(\n max_length=100,\n custom_indexes=[\n {\n 'unique': True, # Optional, used to create unique indexes\n 'name': 'custom_unique_index', # Optional (auto generated), Required only if no columns are specified\n 'where': 'my_field2 > 0', # Optional, used to create partial Indexes\n },\n {\n 'unique': True,\n 'columns': ['lower(my_field1)'], # Optional, Specify columns or expressions for the index\n }\n ]\n )\n my_field2 = model_fields.CustomIntegerField(\n custom_indexes=[\n {\n 'name': 'custom_gin_index1',\n 'using': 'USING gin (my_field2)', # Optional, Specify which method to use for the index\n }\n ]\n )\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/joshtechnologygroup/django-custom-indexes/", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "django-custom-indexes", "package_url": "https://pypi.org/project/django-custom-indexes/", "platform": "", "project_url": "https://pypi.org/project/django-custom-indexes/", "project_urls": { "Homepage": "https://github.com/joshtechnologygroup/django-custom-indexes/" }, "release_url": "https://pypi.org/project/django-custom-indexes/0.1.5/", "requires_dist": null, "requires_python": "", "summary": "PostgreSQL custom indexes for Django models", "version": "0.1.5" }, "last_serial": 4627647, "releases": { "0.1.4": [ { "comment_text": "", "digests": { "md5": "b6fc6b423d98db3bb20a161b6d118e80", "sha256": "3fb2e30205f44be1b98ed284242a8df242bf81f4e96f5359345a58d153816bed" }, "downloads": -1, "filename": "django_custom_indexes-0.1.4-py2-none-any.whl", "has_sig": false, "md5_digest": "b6fc6b423d98db3bb20a161b6d118e80", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7462, "upload_time": "2018-09-04T18:04:57", "url": "https://files.pythonhosted.org/packages/51/88/7d1acaa99f999d8e6f800d769137e8954440a9559bb8d4c226291f28e101/django_custom_indexes-0.1.4-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1e65dc553c2a87735ceefac90d2a25a1", "sha256": "30d3a9ab5b2ac8f1a060e671473dcf7ed71182bdf347f0638efa3aeb0ba76fa5" }, "downloads": -1, "filename": "django-custom-indexes-0.1.4.tar.gz", "has_sig": false, "md5_digest": "1e65dc553c2a87735ceefac90d2a25a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4131, "upload_time": "2018-09-04T18:04:58", "url": "https://files.pythonhosted.org/packages/8f/5f/6656f717f6a3dd8086f9f3ed260e1734b03569af25c6687792061b9c485e/django-custom-indexes-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "478a4cccb26d620ba2532f15fe42ab65", "sha256": "bc4e487c40074e945a3e11f835dad91a74311e2beb1ff1c747573a65967bea01" }, "downloads": -1, "filename": "django_custom_indexes-0.1.5-py2-none-any.whl", "has_sig": false, "md5_digest": "478a4cccb26d620ba2532f15fe42ab65", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7586, "upload_time": "2018-12-22T11:23:33", "url": "https://files.pythonhosted.org/packages/90/a5/5c19df8276867f1ff2664d4652a76d5a462422a2938b334fc1d39e9ff37a/django_custom_indexes-0.1.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d183fb0303c75a2448b9355152fd28dd", "sha256": "b76d37fc1818ec9deb7b49a788c086973c4c5d858422621f50d23515671bf88b" }, "downloads": -1, "filename": "django-custom-indexes-0.1.5.tar.gz", "has_sig": false, "md5_digest": "d183fb0303c75a2448b9355152fd28dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3958, "upload_time": "2018-12-22T11:23:35", "url": "https://files.pythonhosted.org/packages/a7/d3/34359f8ec0822a7332c573ddbb38b3d8b17f30b1d704a8ea3ebbd94754aa/django-custom-indexes-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "478a4cccb26d620ba2532f15fe42ab65", "sha256": "bc4e487c40074e945a3e11f835dad91a74311e2beb1ff1c747573a65967bea01" }, "downloads": -1, "filename": "django_custom_indexes-0.1.5-py2-none-any.whl", "has_sig": false, "md5_digest": "478a4cccb26d620ba2532f15fe42ab65", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7586, "upload_time": "2018-12-22T11:23:33", "url": "https://files.pythonhosted.org/packages/90/a5/5c19df8276867f1ff2664d4652a76d5a462422a2938b334fc1d39e9ff37a/django_custom_indexes-0.1.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d183fb0303c75a2448b9355152fd28dd", "sha256": "b76d37fc1818ec9deb7b49a788c086973c4c5d858422621f50d23515671bf88b" }, "downloads": -1, "filename": "django-custom-indexes-0.1.5.tar.gz", "has_sig": false, "md5_digest": "d183fb0303c75a2448b9355152fd28dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3958, "upload_time": "2018-12-22T11:23:35", "url": "https://files.pythonhosted.org/packages/a7/d3/34359f8ec0822a7332c573ddbb38b3d8b17f30b1d704a8ea3ebbd94754aa/django-custom-indexes-0.1.5.tar.gz" } ] }