{ "info": { "author": "Alexander Klimenko", "author_email": "alex@erix.ru", "bugtrack_url": null, "classifiers": [ "Framework :: Django", "Intended Audience :: Developers", "Operating System :: OS Independent", "Topic :: Software Development" ], "description": "About\n----\n\nThis library is aimed to simplify creation of user sorted lists.\nInspired by https://gist.github.com/piquadrat/3833430\n\nInstallation\n----\n\n1. Install with pip or setup.py\n\n2. Add ordered_listview into `INSTALLED_APPS`. ::\n\n INSTALLED_APPS += ['ordered__listview']\n\n3. Add template tags lib into builtins. ::\n\n add_to_builtins('ordered_listview.templatetags.ordered_listview') // Or load with {% load ordered_listview %}\n\n4. Inherit your view from `OrderedListView`. And setup your ordering fields. ::\n\n from ordered_listview import OrderedListView\n\n class UserListView(OrderedListView):\n allowed_order_by = [\n ('username', _('Login')),\n ('userfile__file__size', _('Size')),\n ('date_joined', _('Sing up date'))\n ]\n default_order_by = 'created'\n\n5. Add a tag into you your template. ::\n\n {% include \"ordered_listview/fields.html\" %}\n\n\nCustomization\n----\n\n1. To change get attribute name, just set `OrderedListView.order_by` attribute ::\n\n class UserListView(OrderedListView):\n order_by = \"order_by\"\n\n2. If you need to provide your own template create inside your `templates`\n`ordered_listview` directory with `fields.html` and `field.html` in.\n\n fields.html - list of sortable fields\n field.html - order field and state template\n\n3. If you want to ignore null values during sort, add fields to null_ignore_fields.\n\n class UserListView(OrderedListView):\n null_ignore_fields = ['quantity']\n\n\n class UserListView(OrderedListView):\n null_ignore_fields = '*' # For all fields", "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/meteozond/django-ordered-listview", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-ordered-listview", "package_url": "https://pypi.org/project/django-ordered-listview/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-ordered-listview/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/meteozond/django-ordered-listview" }, "release_url": "https://pypi.org/project/django-ordered-listview/0.0.2/", "requires_dist": null, "requires_python": null, "summary": "This library is aimed to simplify creation of user sorted lists.", "version": "0.0.2" }, "last_serial": 926431, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "2c8bf41afcfdfebb0a0d0dc120be3357", "sha256": "c9b0889625b25fd7783fb2bd971c81be594236897ee9fb2e144c5e551e13f8ab" }, "downloads": -1, "filename": "django-ordered-listview-0.0.1.tar.gz", "has_sig": false, "md5_digest": "2c8bf41afcfdfebb0a0d0dc120be3357", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2092, "upload_time": "2013-04-30T06:32:58", "url": "https://files.pythonhosted.org/packages/50/28/dcdb358067123bc715024ae7761c6ddd51aea4a62f6bf6b34044d9ede8e6/django-ordered-listview-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "eec00bbfae246b67d120f2dab32b29ce", "sha256": "4ede323c9a2a045c123ea30520effa00340aee7b27f60189d950ad894aa262b4" }, "downloads": -1, "filename": "django-ordered-listview-0.0.2.tar.gz", "has_sig": false, "md5_digest": "eec00bbfae246b67d120f2dab32b29ce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2273, "upload_time": "2013-11-22T12:29:35", "url": "https://files.pythonhosted.org/packages/c3/47/374dabe0f36a1f0cee05a153ba440dd0903d952d0973d98b528712cad59d/django-ordered-listview-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "eec00bbfae246b67d120f2dab32b29ce", "sha256": "4ede323c9a2a045c123ea30520effa00340aee7b27f60189d950ad894aa262b4" }, "downloads": -1, "filename": "django-ordered-listview-0.0.2.tar.gz", "has_sig": false, "md5_digest": "eec00bbfae246b67d120f2dab32b29ce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2273, "upload_time": "2013-11-22T12:29:35", "url": "https://files.pythonhosted.org/packages/c3/47/374dabe0f36a1f0cee05a153ba440dd0903d952d0973d98b528712cad59d/django-ordered-listview-0.0.2.tar.gz" } ] }