{ "info": { "author": "Johannes Spielmann", "author_email": "jps@shezi.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7" ], "description": "There is currently no great way to do tree structures in Django templates.\n \n Thus, this module contains a tag for rendering trees from sequences.\n \n For this, a method for recursion is given, as well as for defining start and end\n markers. A full example of the syntax of this template tag is the following:\n \n {% load treetag %}\n {% tree item_seq %}\n {# outdentation section #}\n {% endtree %}\n \n The syntax defined here thus has two special tags and splits into three\n sections. The sections are:\n \n 1. The tree indentation section\n 2. The tree item section\n 3. The tree outdentation section\n \n Start a tree by enclosing the whole of the tree code with a `tree`/`endtree` tag\n pair. The `tree` tag needs to receive one argument, a sequence of items. This\n sequence will be available inside the tree as a variable named `tree`. The\n renaming is necessary so we can map the sequence in subtrees to the same name.\n \n The three sections are separated by a `for`-loop looping over the items.\n \n In the tree indentation section, place everything that belongs to the 'head' of\n a tree, like the start tags of a list or a table. \n \n In the item section, place everything that renders the item, as well as the\n special recursive tag that renders the subtree. The `subtree` tag simply takes\n \n Finally in the outdentation section, place everything that closes the tree, like\n the closing of the list or table tags and any footer material for the tree.\n \n \n Nested trees are not supported at the moment (i.e. placing a `tree` section\n inside of another `tree` section).\n \n \n Alternatives are:\n * django-mptt: https://github.com/django-mptt/django-mptt/\n * self-made tree unrolling: https://stackoverflow.com/questions/32044/how-can-i-render-a-tree-structure-recursive-using-a-django-template\n * hacking the `include` tag: http://blog.elsdoerfer.name/2008/01/22/recursion-in-django-templates/ (please don't do this!)\n * for simpler cases, the builtin `unordered-list` filter might be sufficient: https://docs.djangoproject.com/en/1.5/ref/templates/builtins/#unordered-list", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/shezi/django-tree-tag/", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-tree-tag", "package_url": "https://pypi.org/project/django-tree-tag/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-tree-tag/", "project_urls": { "Homepage": "https://bitbucket.org/shezi/django-tree-tag/" }, "release_url": "https://pypi.org/project/django-tree-tag/1.0/", "requires_dist": null, "requires_python": null, "summary": "A simple module for recursion in Django templates", "version": "1.0" }, "last_serial": 962821, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "c107f8b40206a232b20d8571d199364c", "sha256": "f603fd599f592fd5f11008bac1cc0c442819df79ef55d83873226a043ba8ba3d" }, "downloads": -1, "filename": "django-tree-tag-1.0.tar.gz", "has_sig": false, "md5_digest": "c107f8b40206a232b20d8571d199364c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3747, "upload_time": "2014-01-07T17:43:41", "url": "https://files.pythonhosted.org/packages/04/4c/eb5db1ecd016c5a85a1e272ba506d266e0ce5faed4eeceb0c5ee133b3719/django-tree-tag-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c107f8b40206a232b20d8571d199364c", "sha256": "f603fd599f592fd5f11008bac1cc0c442819df79ef55d83873226a043ba8ba3d" }, "downloads": -1, "filename": "django-tree-tag-1.0.tar.gz", "has_sig": false, "md5_digest": "c107f8b40206a232b20d8571d199364c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3747, "upload_time": "2014-01-07T17:43:41", "url": "https://files.pythonhosted.org/packages/04/4c/eb5db1ecd016c5a85a1e272ba506d266e0ce5faed4eeceb0c5ee133b3719/django-tree-tag-1.0.tar.gz" } ] }