{ "info": { "author": "directeur", "author_email": "UNKNOWN", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "How to use django-sorting\n----------------------------\n\n``django-sorting`` allows for easy sorting, and tables headers () generation \nwithout modifying your views.\n\nThere are really 5 steps to setting it up with your projects.\n\n1. List this application in the ``INSTALLED_APPS`` portion of your settings\n file. Your settings file might look something like::\n \n INSTALLED_APPS = (\n # ...\n 'sorting',\n )\n\n2. Install the sorting middleware. Your settings file might look something\n like::\n \n MIDDLEWARE_CLASSES = (\n # ...\n 'sorting.middleware.SortingMiddleware',\n )\n\n3. If it's not already added in your setup, add the request context processor.\n Note that context processors are set by default implicitly, so to set them\n explicitly, you need to copy and paste this code into your under\n the value TEMPLATE_CONTEXT_PROCESSORS::\n \n (\"django.core.context_processors.auth\",\n \"django.core.context_processors.debug\",\n \"django.core.context_processors.i18n\",\n \"django.core.context_processors.media\",\n \"django.core.context_processors.request\")\n\n4. Add this line at the top of your template to load the sorting tags:\n\n {% load sorting_tags %}\n\n\n5. Decide on a variable that you would like to sort, and use the\n autosort tag on that variable before iterating over it. \n \n {% autosort object_list %}\n \n \n6. Now, you want to display different headers with links to sort \nyour objects_list:\n \n \n {% th first_name Name %}\n {% th creation_date Creation %}\n ...\n \n\n The first argument is a field of the objects list, and the second \n one(optional) is a title that would be displayed. The previous \n snippet will be rendered like this:\n\n \n Name\n Creation\n ...\n \n\n\nThat's it!", "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/directeur/django-sorting/tree/master", "keywords": "sorting,pagination,django", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-sorting", "package_url": "https://pypi.org/project/django-sorting/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-sorting/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/directeur/django-sorting/tree/master" }, "release_url": "https://pypi.org/project/django-sorting/0.1/", "requires_dist": null, "requires_python": null, "summary": "Like ericflo's django pagination, but this one does the sorting! used with ericflo's pagination, displaying tabular paginated and sortable data is very easy", "version": "0.1" }, "last_serial": 790709, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "6af1c5629362ee734e850e582efef740", "sha256": "2ea0ffa577f520c622a93b529bd61fb1bb64a4b6a8d639c21ef97ce2a43cd373" }, "downloads": -1, "filename": "django-sorting-0.1.tar.gz", "has_sig": false, "md5_digest": "6af1c5629362ee734e850e582efef740", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4848, "upload_time": "2009-08-20T16:12:47", "url": "https://files.pythonhosted.org/packages/45/59/ad07cf0fc622f9ade0765ead9d2ce1314b8800dcf0ca78336f3106c133ba/django-sorting-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6af1c5629362ee734e850e582efef740", "sha256": "2ea0ffa577f520c622a93b529bd61fb1bb64a4b6a8d639c21ef97ce2a43cd373" }, "downloads": -1, "filename": "django-sorting-0.1.tar.gz", "has_sig": false, "md5_digest": "6af1c5629362ee734e850e582efef740", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4848, "upload_time": "2009-08-20T16:12:47", "url": "https://files.pythonhosted.org/packages/45/59/ad07cf0fc622f9ade0765ead9d2ce1314b8800dcf0ca78336f3106c133ba/django-sorting-0.1.tar.gz" } ] }