{ "info": { "author": "Jacob Radford", "author_email": "nkryptic@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "django-refinery\r\n===============\r\n\r\nAllows users to filter down a queryset based on a model's fields, similar to\r\nthe Django admin's ``list_filter`` interface. A ``FilterTool`` helper class\r\nis provided, which will (by default) map filters to model fields and create\r\na form for queryset manipulation. The helper class supports an interface \r\nwhich will feel familiar to anyone who's used a Django ``ModelForm``.\r\n\r\n:Author: `Jacob Radford `_\r\n:Licence: BSD\r\n\r\n\r\nExample usage\r\n-------------\r\n\r\nGiven a ``Product`` model you could create a ``FilterTool`` for it with::\r\n\r\n import refinery\r\n \r\n class ProductFilterTool(refinery.FilterTool):\r\n class Meta:\r\n model = Product\r\n fields = ['name', 'price']\r\n\r\nAnd then in your view you could do::\r\n\r\n def product_list(request):\r\n filtertool = ProductFilterTool(request.GET or None)\r\n return render_to_response('product/product_list.html',\r\n {'filtertool': filtertool})\r\n\r\nAnd then in your template::\r\n\r\n
\r\n {{ filtertool.form.as_p }}\r\n \r\n
\r\n

Products

\r\n \r\n\r\nFor more complex usage or custom needs, refer to the project documentation.\r\n\r\n\r\nRequirements\r\n------------\r\n\r\n* Python 2.5+\r\n* Django 1.3+\r\n\r\n\r\nInstallation\r\n------------\r\n\r\n* ``pip install -U django-refinery``\r\n* Add ``refinery`` to your ``INSTALLED_APPS``\r\n\r\nTo install the `in-development version`_ of django-refinery, run ``pip\r\ninstall django-refinery==dev``.\r\n\r\n.. _`in-development version`: https://github.com/nkryptic/django-refinery/tarball/master#egg=django-refinery-dev\r\n\r\n\r\nDocumentation\r\n-------------\r\n\r\nSee the ``docs`` folder or `read it on readthedocs`_ for expanded\r\ninformation on:\r\n\r\n* Usage examples\r\n* Contributing\r\n* Integration with other apps\r\n* Project background\r\n* Low-level API\r\n* Creating custom filters\r\n\r\n.. _`read it on readthedocs`: http://django-refinery.rtfd.org\r\n\r\n\r\nBugs\r\n----\r\n\r\nIf you want to help out with the development of django-refinery, by\r\nposting detailed bug reports, proposing new features, or suggesting\r\ndocumentation improvements, use the `issue tracker`_. If you want to\r\nfix it yourself, thank you! `Fork the project`_, make changes and\r\n`send a pull request`_. Please do create an issue to discuss your plans.\r\n\r\n.. _`issue tracker`: http://github.com/nkryptic/django-refinery/issues\r\n.. _`Fork the project`: http://help.github.com/fork-a-repo\r\n.. _`send a pull request`: http://help.github.com/send-pull-requests/\r\n\r\n\r\nBackground\r\n----------\r\n\r\nDjango-refinery is based on `django-filter`_, an application created\r\nby `Alex Gaynor`_. For a complete project history and list of contributors,\r\nsee the project documentation.\r\n\r\n.. _`django-filter`: https://github.com/alex/django-filter\r\n.. _`Alex Gaynor`: https://github.com/alex\r\n\r\nRoadmap\r\n-------\r\n\r\n* Overhaul and expand documentation\r\n* Overhaul and expand test suite\r\n* Refactor generic class view (look into pagination of ListView)\r\n* Allow integration of django-floppyforms\r\n* Allow integration of django-crispy-forms\r\n* Allow filters on non-required fields with choices to provide\r\n option of filtering the records that are unset. (i.e. FK is null)\r\n* Allow abstraction of ordering values used to avoid passing internal\r\n information in GET params (i.e. ``user__username``)\r\n* Look into adapting ``LinkWidget`` and overall behavior to support\r\n filtering like `django-easyfilters`_ or maybe drop the widget?\r\n\r\n.. _`django-easyfilters`: http://pypi.python.org/pypi/django-easyfilters\r\n\r\n\r\nResources\r\n---------\r\n\r\n* `Documentation `_\r\n* `Bug Tracker `_\r\n* `Code `_\r\n* `Continuous Integration `_", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/nkryptic/django-refinery", "keywords": "django,refine,filter,models,querysets,forms", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "django-refinery", "package_url": "https://pypi.org/project/django-refinery/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-refinery/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/nkryptic/django-refinery" }, "release_url": "https://pypi.org/project/django-refinery/0.1/", "requires_dist": null, "requires_python": null, "summary": "Django-refinery is a reusable Django application for allowing users to filter queryset dynamically.", "version": "0.1" }, "last_serial": 421212, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "7214c41471a406d359054ea6e432ec9f", "sha256": "413974bba999f2b115bf95a4fa2895c054b867e88f70cc03b33999ff640208b3" }, "downloads": -1, "filename": "django-refinery-0.1.tar.gz", "has_sig": false, "md5_digest": "7214c41471a406d359054ea6e432ec9f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23011, "upload_time": "2012-05-19T13:21:15", "url": "https://files.pythonhosted.org/packages/89/c0/e6761667e8f45d913c8df67319285ab7eddacf3d7ade95fc67e501a44e45/django-refinery-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7214c41471a406d359054ea6e432ec9f", "sha256": "413974bba999f2b115bf95a4fa2895c054b867e88f70cc03b33999ff640208b3" }, "downloads": -1, "filename": "django-refinery-0.1.tar.gz", "has_sig": false, "md5_digest": "7214c41471a406d359054ea6e432ec9f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23011, "upload_time": "2012-05-19T13:21:15", "url": "https://files.pythonhosted.org/packages/89/c0/e6761667e8f45d913c8df67319285ab7eddacf3d7ade95fc67e501a44e45/django-refinery-0.1.tar.gz" } ] }