{ "info": { "author": "Quentin Schroter", "author_email": "qschroter@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Django-SearchableListView\n=========================\n\n[![Build Status](https://travis-ci.org/SchroterQuentin/django-search-listview.svg?branch=master)](https://travis-ci.org/SchroterQuentin/django-search-listview)\n[![Coverage Status](https://coveralls.io/repos/github/SchroterQuentin/Django-SearchableListView/badge.svg)](https://coveralls.io/github/SchroterQuentin/Django-SearchableListView)\n[![Code Health](https://landscape.io/github/SchroterQuentin/django-search-listview/master/landscape.svg?style=flat)](https://landscape.io/github/SchroterQuentin/django-search-listview/master)\n\nListView which can be searchable, paginate and which doesn't lose query parameter and page number\n\nInstallation\n------------\n\nThis library need jQuery ( and Bootstrap for the frond-end ) \nTo install it in your vitualenv on your django project\n\n```{r, engine='bash', count_lines}\npip install django-search-listview\n```\n\n```python\nINSTALLED_APPS = [\n ...\n 'search_listview',\n]\n```\n\n\nOnly paginate ListView\n----------------------\n\n```python\nfrom search_listview.list import SearchableListView\n\nclass ListDevicePaginate(SearchableListView):\n model = Device\n template_name = \"tests/list.html\"\n paginate_by = 10\n```\n \nPaginate + Searchable ListView\n------------------------------\n\n```python\nfrom search_listview.list import SearchableListView\n\nclass ListDeviceSearchablePaginate(SearchableListView):\n model = Device\n template_name = \"tests/list.html\"\n paginate_by = 10\n searchable_fields = [\"inventory_number\", \"model_device\", \"model_device__brand__provider\",\n \"model_device__brand__name\"]\n specifications = {\n \"model_device__brand__name\": \"__icontains\"\n }\n```\n\nPut the parameter for the query in **searchable_fields** which will be use to filter the queryset. The specifications which be use in the same way.\n\nIn the template\n---------------\n\n- Where you want the pagination and the search box\n\n```html\n
\n {% include \"search_listview/search_and_page.html\" %}\n
\n```\n\n- In the footer\n\n```html\n\n\n \n```\n\nNow you have a beautifull box with all the fields you need.\n\n![Alt tag](/docs/search_box.png?raw=true \"Search box\")", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/SchroterQuentin/django-search-listview/tarball/0.1", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/SchroterQuentin/django-search-listview", "keywords": "django,listView,search", "license": "PSF", "maintainer": null, "maintainer_email": null, "name": "django-search-listview", "package_url": "https://pypi.org/project/django-search-listview/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-search-listview/", "project_urls": { "Download": "https://github.com/SchroterQuentin/django-search-listview/tarball/0.1", "Homepage": "https://github.com/SchroterQuentin/django-search-listview" }, "release_url": "https://pypi.org/project/django-search-listview/0.2.1/", "requires_dist": null, "requires_python": null, "summary": "Searchable and paginable ListView", "version": "0.2.1" }, "last_serial": 2698157, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "ebef672418dd4cfa4cf43ba2c74c5a80", "sha256": "3ad0e2b56d6f235a8f2386d7cf88ffd075ebdf52e2d52b0ba3bfa4f59b349d02" }, "downloads": -1, "filename": "django-search-listview-0.1.tar.gz", "has_sig": false, "md5_digest": "ebef672418dd4cfa4cf43ba2c74c5a80", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12674, "upload_time": "2016-08-30T15:06:29", "url": "https://files.pythonhosted.org/packages/7e/05/983c0a393a6df22e0f4bee1cb99da71bc3e244696f2d57afa1ba05abf44f/django-search-listview-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "264fb645ea2dc19dd7944443d5a494be", "sha256": "46f728b4e0e5e0938a567b1dedaa8e27819d1eecbbf340e68a94cc81c8cd1d02" }, "downloads": -1, "filename": "django-search-listview-0.1.1.tar.gz", "has_sig": false, "md5_digest": "264fb645ea2dc19dd7944443d5a494be", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12748, "upload_time": "2016-08-30T15:49:30", "url": "https://files.pythonhosted.org/packages/51/b6/ff5a7ac3861974bef9df1a9556ed50bfcd14c92ec292827fba9ea13fc249/django-search-listview-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "890543651b76c34559596643b49ae617", "sha256": "1f4949a275e31774ca65ae3c70876c2aa25d32d03c34aa6e5fda707a104881eb" }, "downloads": -1, "filename": "django-search-listview-0.2.0.zip", "has_sig": false, "md5_digest": "890543651b76c34559596643b49ae617", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12042, "upload_time": "2017-03-10T22:23:15", "url": "https://files.pythonhosted.org/packages/59/70/3a6032472e71cc117f9b25ab404bc60c9aaf2c0264f969fc6dbb7fb91b30/django-search-listview-0.2.0.zip" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "371ed8b4996853606cd6cb120bea6722", "sha256": "b3354dff8a1d27c7b43f8471933a34329c2154639a2bccd76954ec114d31c0b2" }, "downloads": -1, "filename": "django-search-listview-0.2.1.zip", "has_sig": false, "md5_digest": "371ed8b4996853606cd6cb120bea6722", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12043, "upload_time": "2017-03-10T22:27:04", "url": "https://files.pythonhosted.org/packages/25/03/b2b71fea2e1c63083ffa60cf2a1a770c7b3d9e8942431615fe57b1a0568c/django-search-listview-0.2.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "371ed8b4996853606cd6cb120bea6722", "sha256": "b3354dff8a1d27c7b43f8471933a34329c2154639a2bccd76954ec114d31c0b2" }, "downloads": -1, "filename": "django-search-listview-0.2.1.zip", "has_sig": false, "md5_digest": "371ed8b4996853606cd6cb120bea6722", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12043, "upload_time": "2017-03-10T22:27:04", "url": "https://files.pythonhosted.org/packages/25/03/b2b71fea2e1c63083ffa60cf2a1a770c7b3d9e8942431615fe57b1a0568c/django-search-listview-0.2.1.zip" } ] }