{ "info": { "author": "Gabriel Grant", "author_email": "g@briel.ca", "bugtrack_url": null, "classifiers": [], "description": "django-multiforloop provides an enhancement to django's builtin forloop\ntemplate tag, which makes it easier to iterate over multiple lists\nsimultaneously (acting similarly to Python's `zip`).\n\nmultiforloop allows this Python idiom to be used in django templates:\n\nfor x,y in zip(x_list, y_list):\n\tprint x,y\n\nNormally, to iterate over multiple lists simultaneously in django templates,\nthe lists must be zipped in the view and passed in as an extra context\nvariable. When this is the only extra processing needed in a view (eg. with\ngeneric views), this can result in a fair bit of unneeded boilerplate code. \n\n##Usage\n\nRendering this template\n\n {% load multifor %}\n {% for x in x_list; y in y_list %}\n {{ x }}:{{ y }}\n {% endfor %}\n\nwith this context\n\n context = {\n \"x_list\": ('one', 1, 'carrot'),\n \"y_list\": ('two', 2, 'orange')\n }\n\nwill output\n\n one:two\n 1:2\n carrot:orange\n\nThe multifor tag library also includes a `for_longest` tag that functions\nsimilarly to izip_longest from Python's itertools library. Whereas the\nnormal for loop will truncate all inputs to the length of the shortest,\nfor_longest will iterate over all values of the longest, filling any shorter\ninputs with the value in settings.TEMPLATE_STRING_IF_INVALID ('' by default).\n\nObserve the difference:\n\n\nRendering this template\n\n {% load multifor %}\n {% for x in x_list; y in y_list %}\n {{ x }}:{{ y }}\n {% endfor %}\n\nwith this context\n\n context = {\n \"x_list\": ('one', 1, 'carrot'),\n \"y_list\": ('two', 2)\n }\n\nwill output\n\n one:two\n 1:2\n\nWhile rendering this template\n\n {% load multifor %}\n {% for_longest x in x_list; y in y_list %}\n {{ x }}:{{ y }}\n {% endfor %}\n\nwith the same context\n\n context = {\n \"x_list\": ('one', 1, 'carrot'),\n \"y_list\": ('two', 2)\n }\n\nwill output\n\n one:two\n 1:2\n carrot:\n\n## Installation\n\n1. pip install django-multiforloop\n2. Include 'multiforloop' in your settings.py's list of installed apps\n3. Add `{% load multifor %}` to the top of any templates which use the multiforloop", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.org/gabrielgrant/django-multiforloop/", "keywords": null, "license": "LGPL", "maintainer": null, "maintainer_email": null, "name": "django-multiforloop", "package_url": "https://pypi.org/project/django-multiforloop/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-multiforloop/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.org/gabrielgrant/django-multiforloop/" }, "release_url": "https://pypi.org/project/django-multiforloop/0.2.1/", "requires_dist": null, "requires_python": null, "summary": "UNKNOWN", "version": "0.2.1" }, "last_serial": 2692950, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "8ac5fcd3db25a2f863ecd58064da4753", "sha256": "e08c429981b91d173907339dfcb0ab8cfd6fa446ed9b3dd5f875c7d64b8998c7" }, "downloads": -1, "filename": "django-multiforloop-0.1.1.linux-i686.exe", "has_sig": false, "md5_digest": "8ac5fcd3db25a2f863ecd58064da4753", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 65074, "upload_time": "2011-01-19T05:33:25", "url": "https://files.pythonhosted.org/packages/cf/cf/0b05a3e9fd4caa2f2323f129e06c0f674295b7f9182c3b092e9c3c3babb0/django-multiforloop-0.1.1.linux-i686.exe" }, { "comment_text": "", "digests": { "md5": "7bd3b9365509987894426cb46548a9dd", "sha256": "ac45956afc85eb0e628d2298bcfdadde937c152b4e07694958d18b6818c9915a" }, "downloads": -1, "filename": "django-multiforloop-0.1.1.tar.gz", "has_sig": false, "md5_digest": "7bd3b9365509987894426cb46548a9dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1750, "upload_time": "2011-01-19T05:33:23", "url": "https://files.pythonhosted.org/packages/fa/f0/b4a7d84a8613a04db7214fe67b806c73027afd83b5ec203234d05d35f7cc/django-multiforloop-0.1.1.tar.gz" } ], "0.1dev": [ { "comment_text": "", "digests": { "md5": "cc8f269fadd3a689140645403349e49f", "sha256": "f6f82ca1fbd95217d36558a866d88a981e6b64d34526657106dcf8889b92924b" }, "downloads": -1, "filename": "django-multiforloop-0.1dev.linux-i686.exe", "has_sig": false, "md5_digest": "cc8f269fadd3a689140645403349e49f", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 65064, "upload_time": "2011-01-19T05:12:29", "url": "https://files.pythonhosted.org/packages/5c/39/92a29a482abbed3e2ab54fa44423010d50fd0dc47a984d575f54049950d8/django-multiforloop-0.1dev.linux-i686.exe" }, { "comment_text": "", "digests": { "md5": "d811351080718d24f7ebbd51cdd946c1", "sha256": "59a47033e3217f938d299273d7b87b4afa3b5d5a8fa4dc2555a1c76511d3680b" }, "downloads": -1, "filename": "django-multiforloop-0.1dev.tar.gz", "has_sig": false, "md5_digest": "d811351080718d24f7ebbd51cdd946c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1729, "upload_time": "2011-01-19T05:12:27", "url": "https://files.pythonhosted.org/packages/56/bb/a2ebf73afbb1c3e4812c32da1ec521a1ba71725ac040f8c1efacd44b0335/django-multiforloop-0.1dev.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "a3bae7d9f5a51b315b823271a920ed01", "sha256": "f08cac08f0a7451fc8261349ac19cd0fe5743d81dcd5b2d057626348ba7cfdcb" }, "downloads": -1, "filename": "django-multiforloop-0.2.0.linux-i686.exe", "has_sig": false, "md5_digest": "a3bae7d9f5a51b315b823271a920ed01", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 66399, "upload_time": "2011-01-25T04:20:23", "url": "https://files.pythonhosted.org/packages/0e/f4/039062e1a5379eaca4cfd97e42ed123948241acaba136a5899855bb01e67/django-multiforloop-0.2.0.linux-i686.exe" }, { "comment_text": "", "digests": { "md5": "70a5d6a59ee8fcb9094dd3b6c104c486", "sha256": "1ad792e1681d03e623b5fbf12042c88be91f245c19b05eb4c7deb8d1f5fdf78a" }, "downloads": -1, "filename": "django-multiforloop-0.2.0.tar.gz", "has_sig": false, "md5_digest": "70a5d6a59ee8fcb9094dd3b6c104c486", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2062, "upload_time": "2011-01-25T04:20:21", "url": "https://files.pythonhosted.org/packages/f8/2f/922bedbd6795c20c60298818cb19358e57d37994bb71984cde6ca78ae916/django-multiforloop-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "3f0036c6f254a3995489c0f509c2b24c", "sha256": "d7b25b1ce58787c2bead6dad1aed5f63eabb2eeacb009d7090d67e964b29d6fb" }, "downloads": -1, "filename": "django-multiforloop-0.2.1.linux-i686.exe", "has_sig": false, "md5_digest": "3f0036c6f254a3995489c0f509c2b24c", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 66434, "upload_time": "2011-01-25T04:48:22", "url": "https://files.pythonhosted.org/packages/aa/fa/57badc1cbe6661e804572fe364067c352b37c113c90b0590d858c4334553/django-multiforloop-0.2.1.linux-i686.exe" }, { "comment_text": "", "digests": { "md5": "58beef37ed2ff9f90734eb0c5d8958a2", "sha256": "4a4c1832fbb2769e1b07e8c03c6cdcbfb2d361e22f15363007d311a914e7dd6b" }, "downloads": -1, "filename": "django-multiforloop-0.2.1.tar.gz", "has_sig": false, "md5_digest": "58beef37ed2ff9f90734eb0c5d8958a2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2090, "upload_time": "2011-01-25T04:48:20", "url": "https://files.pythonhosted.org/packages/d0/a3/84965eb80d65ddc1b08aae655caa509edf951f55fe14e4054b779c054c85/django-multiforloop-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3f0036c6f254a3995489c0f509c2b24c", "sha256": "d7b25b1ce58787c2bead6dad1aed5f63eabb2eeacb009d7090d67e964b29d6fb" }, "downloads": -1, "filename": "django-multiforloop-0.2.1.linux-i686.exe", "has_sig": false, "md5_digest": "3f0036c6f254a3995489c0f509c2b24c", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 66434, "upload_time": "2011-01-25T04:48:22", "url": "https://files.pythonhosted.org/packages/aa/fa/57badc1cbe6661e804572fe364067c352b37c113c90b0590d858c4334553/django-multiforloop-0.2.1.linux-i686.exe" }, { "comment_text": "", "digests": { "md5": "58beef37ed2ff9f90734eb0c5d8958a2", "sha256": "4a4c1832fbb2769e1b07e8c03c6cdcbfb2d361e22f15363007d311a914e7dd6b" }, "downloads": -1, "filename": "django-multiforloop-0.2.1.tar.gz", "has_sig": false, "md5_digest": "58beef37ed2ff9f90734eb0c5d8958a2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2090, "upload_time": "2011-01-25T04:48:20", "url": "https://files.pythonhosted.org/packages/d0/a3/84965eb80d65ddc1b08aae655caa509edf951f55fe14e4054b779c054c85/django-multiforloop-0.2.1.tar.gz" } ] }