{ "info": { "author": "Vadim Iskuchekov", "author_email": "egregors@yandex.ru", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "# django-silly-search\n\nSimple django-app for search by Q-expressions.\n\n[![Build Status](https://travis-ci.org/Egregors/django-silly-search.svg?branch=master)](https://travis-ci.org/Egregors/django-silly-search)\n\nIf you need the simple way to search, without full-text,\nmorphology features, this app may be useful. But, if you need search for more\ncomplicated case, you should use something like [Haystack](http://haystacksearch.org/)\n\n## Features\n\n* Search for one or few models\n* Search for multiple fields\n\n## Install\n\nClone this repo and install from the source:\n```\ngit clone https://github.com/Egregors/django-silly-search.git\ncd django-silly-search\npip install -e .\n```\n\nor just use PyPI\n\n```\npip install django-silly-search\n```\n\n## How to use\n\nThe app provides a single function:\n\n```\nfrom silly_search import q_search\n\n# q_search(models, fields, q) -> list of ModelBase instances\n```\nThe functions takes required arguments:\n\n`models` \u2013 Models for search. Should be instance of `ModelBase` (regular Model)\nor `list` of `ModelBase` instances\n\n`fields` \u2013 Fields for search. Should be `str` or `list` of `str` (just name of models field)\n\n`q` \u2013 phrase for search. Should be an `str`\n\nAs result, you'll get list of ModelBase instances.\nKeep in mind, if you use it to search for few different models, you'll probably get\nlist of instances different ModelBase class heirs.\n\n## Example\n\nLet's say you have Models:\n\n```\nclass Article(models.Model):\n title = models.CharField(max_length=128)\n description = models.CharField(max_length=255)\n text = models.TextField()\n\n\nclass News(models.Model):\n pub_date = models.DateTimeField(auto_now_add=True)\n title = models.CharField(max_length=128)\n text = models.TextField()Z\n```\n\nand you want to make search on these models. So, you can search for one model and one field:\n\n```\n q_search(Article, 'title', q='spam')\n```\n\nor for one models, but few fields:\n\n```\n q_search(Article, fields=['title', 'text'], q='spam')\n```\n\nor for few models and few fields:\n```\n q_search(models=[Article, News], fields=['title', 'description', 'text'], q='spam')\n```\n\n## Contributing\n\nBug reports, bug fixes, and new features are always welcome.\nPlease open issues, and submit pull requests for any new code.", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/Egregors/django-silly-search/tarball/master", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Egregors/django-silly-search", "keywords": "django", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "django-silly-search", "package_url": "https://pypi.org/project/django-silly-search/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-silly-search/", "project_urls": { "Download": "https://github.com/Egregors/django-silly-search/tarball/master", "Homepage": "https://github.com/Egregors/django-silly-search" }, "release_url": "https://pypi.org/project/django-silly-search/0.1.2/", "requires_dist": [ "django (>=1.8)" ], "requires_python": "", "summary": "Really simple django-app for search by Q-expressions", "version": "0.1.2" }, "last_serial": 2175424, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "ae7b151477a2f50cf997a515f6b27efa", "sha256": "6ce50aa74c4fc3a0979145e3fe700463578ae75224c0e3af2cc6c7c0235e8bda" }, "downloads": -1, "filename": "django_silly_search-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ae7b151477a2f50cf997a515f6b27efa", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5273, "upload_time": "2016-06-18T10:08:53", "url": "https://files.pythonhosted.org/packages/fa/34/a6a51a9ee4b17e0fbd681f7f1fe236bcf4cc7202593821f44e44f7256853/django_silly_search-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dfa32f2381bf64ce0aa4e27f91f6c337", "sha256": "7063b0ab1766b239a07f98353b497fdc8e3f651fc44ac71acd4d6335125fe7a4" }, "downloads": -1, "filename": "django-silly-search-0.1.0.tar.gz", "has_sig": false, "md5_digest": "dfa32f2381bf64ce0aa4e27f91f6c337", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3137, "upload_time": "2016-06-18T10:08:57", "url": "https://files.pythonhosted.org/packages/fc/a1/56c06f5797506068a70703e258e76bd67785771e8a42961726228aac1aa5/django-silly-search-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "fc50134d58926061d0f7c69e76c76cc8", "sha256": "3acb1c51ed408c4050da7db555b389a3d4a6e0feec96ef663cbe07cd77d97b0b" }, "downloads": -1, "filename": "django_silly_search-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "fc50134d58926061d0f7c69e76c76cc8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5362, "upload_time": "2016-06-18T11:03:40", "url": "https://files.pythonhosted.org/packages/28/49/3211c3f536836c45e16d77d36fd3b82194899e21f22f0e1351e411dfb4c2/django_silly_search-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "43e9147902868e31a69351a3bed4975b", "sha256": "2c49ef6bb1afe24fdcc7c9123c16be694eebe4f00031f32683ca002ff0714f51" }, "downloads": -1, "filename": "django-silly-search-0.1.1.tar.gz", "has_sig": false, "md5_digest": "43e9147902868e31a69351a3bed4975b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3191, "upload_time": "2016-06-18T11:03:45", "url": "https://files.pythonhosted.org/packages/7f/70/54209859bd7a7255d945ed8e608f904592bd43cea4340ea777905adf3a8b/django-silly-search-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "993b1dc9845d31d9368273677fb9c640", "sha256": "37b2388f8a1114520ead5d4cbc0973e060feb5ab07c19601afdfaed43e0fa685" }, "downloads": -1, "filename": "django_silly_search-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "993b1dc9845d31d9368273677fb9c640", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5496, "upload_time": "2016-06-19T06:05:45", "url": "https://files.pythonhosted.org/packages/43/1b/6a882aa8b17375f5bf4678ae73fad371e2e54933faae3b60ad53cb2af3d1/django_silly_search-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "88476374e8261068e34500bf7d742a93", "sha256": "408ef136511152eecddfa5aa54657e2da2e2206c60d0448c699061bb0471fb71" }, "downloads": -1, "filename": "django-silly-search-0.1.2.tar.gz", "has_sig": false, "md5_digest": "88476374e8261068e34500bf7d742a93", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3272, "upload_time": "2016-06-19T06:05:50", "url": "https://files.pythonhosted.org/packages/70/15/80d37a14b57e1ff0c795adfd2ea2efd756b4a884056c3c156dd979877589/django-silly-search-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "993b1dc9845d31d9368273677fb9c640", "sha256": "37b2388f8a1114520ead5d4cbc0973e060feb5ab07c19601afdfaed43e0fa685" }, "downloads": -1, "filename": "django_silly_search-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "993b1dc9845d31d9368273677fb9c640", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5496, "upload_time": "2016-06-19T06:05:45", "url": "https://files.pythonhosted.org/packages/43/1b/6a882aa8b17375f5bf4678ae73fad371e2e54933faae3b60ad53cb2af3d1/django_silly_search-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "88476374e8261068e34500bf7d742a93", "sha256": "408ef136511152eecddfa5aa54657e2da2e2206c60d0448c699061bb0471fb71" }, "downloads": -1, "filename": "django-silly-search-0.1.2.tar.gz", "has_sig": false, "md5_digest": "88476374e8261068e34500bf7d742a93", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3272, "upload_time": "2016-06-19T06:05:50", "url": "https://files.pythonhosted.org/packages/70/15/80d37a14b57e1ff0c795adfd2ea2efd756b4a884056c3c156dd979877589/django-silly-search-0.1.2.tar.gz" } ] }