{ "info": { "author": "Julien Phalip, Peter Hogg", "author_email": "peter@havenaut.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Framework :: Django", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "django-simplesearch\n============\n\nA reusable [Django](http://www.djangoproject.com/) application for simple searching, based on [Julien Phalip's original code](http://julienphalip.com/post/2825034077/adding-search-to-a-django-site-in-a-snap>).\n\n\nHow it Works\n------------\n\nA string of search terms are passed to the `get_query` function, along with a list of the model fields to search. These terms are normalized by `normalize_query`, which splits the query string into individual keyword, keeping quoted words together and removing [stop words](https://en.wikipedia.org/wiki/Stop_words). The `get_query` function then returns a [Q object](https://docs.djangoproject.com/en/dev/topics/db/queries/#complex-lookups-with-q-objects) which may be used to search the given fields for the given term.\n\n\nInstallation\n------------\n\ndjango-simplesearch is available on PyPI and can be installed with PIP.\n\n pip install django-simplesearch\n\nAlternatively, you may download the source and install it.\n\n python setup.py install\n\n\nSetup\n-----\n\nAdd `simplesearch` to your `settings.INSTALLED_APPS`.\n\n\nUsage\n-----\n\ndjango-simplesearch was created to search blog posts. To search a model `Post` in the fields `title` and `body` based on a search query submitted by a form to HTTP GET, you might do something like this:\n\n if 'q' in request.GET:\n query_string = request.GET['q']\n entry_query = get_query(query_string, ['title', 'body'])\n results = Post.objects.published().filter(entry_query).distinct()\n\nIn this case, the `Post` objects that matched the search query is stored within `results`.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/pigmonkey/django-simplesearch", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-simplesearch", "package_url": "https://pypi.org/project/django-simplesearch/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-simplesearch/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/pigmonkey/django-simplesearch" }, "release_url": "https://pypi.org/project/django-simplesearch/1.0/", "requires_dist": null, "requires_python": null, "summary": "A basic search application for Django.", "version": "1.0" }, "last_serial": 748739, "releases": { "0.1": [], "1.0": [ { "comment_text": "", "digests": { "md5": "4e7aadbff542438368eee0041f14ab41", "sha256": "4dd55612ffd0164a971abbac59337795140a876bb06a38da9aa9bee28c00c287" }, "downloads": -1, "filename": "django_simplesearch-1.0-py2.7.egg", "has_sig": true, "md5_digest": "4e7aadbff542438368eee0041f14ab41", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 6483, "upload_time": "2012-07-20T20:08:19", "url": "https://files.pythonhosted.org/packages/d4/2d/1a90462b8ac5300e45458a10e686df8a3522e4dfedaf17cdef1f838b3b87/django_simplesearch-1.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "47c73df6bc4c0ce291b791568b049f57", "sha256": "14fd1fce291d221ce9b58ca98be9931d82e74bb39aeff7d5247f1c47c0ff7049" }, "downloads": -1, "filename": "django-simplesearch-1.0.tar.gz", "has_sig": true, "md5_digest": "47c73df6bc4c0ce291b791568b049f57", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3671, "upload_time": "2012-07-20T20:08:52", "url": "https://files.pythonhosted.org/packages/03/0d/f98ffe575efc94dc1e9cc13629c113f4a6876bc6880d86eacfdb764ac14a/django-simplesearch-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4e7aadbff542438368eee0041f14ab41", "sha256": "4dd55612ffd0164a971abbac59337795140a876bb06a38da9aa9bee28c00c287" }, "downloads": -1, "filename": "django_simplesearch-1.0-py2.7.egg", "has_sig": true, "md5_digest": "4e7aadbff542438368eee0041f14ab41", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 6483, "upload_time": "2012-07-20T20:08:19", "url": "https://files.pythonhosted.org/packages/d4/2d/1a90462b8ac5300e45458a10e686df8a3522e4dfedaf17cdef1f838b3b87/django_simplesearch-1.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "47c73df6bc4c0ce291b791568b049f57", "sha256": "14fd1fce291d221ce9b58ca98be9931d82e74bb39aeff7d5247f1c47c0ff7049" }, "downloads": -1, "filename": "django-simplesearch-1.0.tar.gz", "has_sig": true, "md5_digest": "47c73df6bc4c0ce291b791568b049f57", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3671, "upload_time": "2012-07-20T20:08:52", "url": "https://files.pythonhosted.org/packages/03/0d/f98ffe575efc94dc1e9cc13629c113f4a6876bc6880d86eacfdb764ac14a/django-simplesearch-1.0.tar.gz" } ] }