{ "info": { "author": "Yuri Malinov", "author_email": "yurik.m@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Django Pythonic Menu\r\n--\r\n\r\nThis is a simple library to help with building and working with site menu in your way.\r\n\r\nIt solves one issue: list available menu items and toggle some of them active.\r\nThen pass it to template. With menu levels if you wish. In readable way.\r\n\r\nUsage is following:\r\n```python\r\n# 1. Define the menu\r\nclass AppMenu(Menu):\r\n first_menu_item = MenuItem('first_route')\r\n another_menu_item = MenuItem('another_route', title=\"Some title\", and_other_value_passed_to_template='Yea!')\r\n\r\n class SubMenu(Menu):\r\n subitem = MenuItem('subitem_route')\r\n\r\n class Meta:\r\n visibility = lambda request, item: request.user.is_authenticated\r\n other_view_data = 'goes here'\r\n\r\n# 2. Then activate it:\r\n@AppMenu.first_menu_item.activate\r\ndef my_view(request):\r\n pass\r\n```\r\n\r\n```html\r\n# 3. Then render it in view as you like it:\r\n{% load pythonic_menu %}\r\n{% render_menu 'path.to.AppMenu' menu %}\r\n\r\n{% for item in menu.items %}\r\n{{ item.title }}\r\n{{ item.and_other_value_passed_to_template }}\r\n{% endfor %}\r\n```\r\nExtra abilities:\r\n==\r\n* Submenus (just define another Menu inside Menu).\r\n* Visibility checking (provide `visibility=lambda request, item: request.user.is_staff` argument).\r\n* Ability to provide callbacks for urls (just pass `callback(request, item)`).\r\n* Ability to cache & validate routes (call `Menu.cache_routes()` in your `App.ready()` method.\r\n\r\nGoals\r\n==\r\nMain goals are:\r\n* This is static menu written in Python. So no models/DB.\r\n* Simple way to be mark active items. Just add decorator to your views. Also it's bound to menu definition so existence of items is checked on app start.\r\n* No restrictions on view: you have {url: , title: , active: ) from library. Everything other is yours: add icon=.., className=.. etc as you like.\r\n* Rendering menu is project-specific so it's your responsibility to make template for it.\r\n\r\nFeedback\r\n==\r\nIf you have any ideas/questions post either issue or pull request.\r\n\r\nIf you use it and found useful then write me a message or make a pull request to change alter this page.", "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/YuriMalinov/django-pythonic-menu/", "keywords": "django menu python", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django_pythonic_menu", "package_url": "https://pypi.org/project/django_pythonic_menu/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django_pythonic_menu/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/YuriMalinov/django-pythonic-menu/" }, "release_url": "https://pypi.org/project/django_pythonic_menu/0.0.6/", "requires_dist": null, "requires_python": null, "summary": "Python based menu for django", "version": "0.0.6" }, "last_serial": 2457942, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "fa9ca6cb10bc30a713e56a725836402c", "sha256": "f9295c3f928c79b5d0c0016518bd3f9dd06f7f731c4eff1c5c467e5488c219f2" }, "downloads": -1, "filename": "django_pythonic_menu-0.0.1.zip", "has_sig": false, "md5_digest": "fa9ca6cb10bc30a713e56a725836402c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11074, "upload_time": "2016-07-04T21:36:08", "url": "https://files.pythonhosted.org/packages/49/d6/bd8002ddae80f932a30a43519f8292868a99d45ae8de82d2d7cf374a29bc/django_pythonic_menu-0.0.1.zip" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "55e36270e5c4c9c02bdea88582dddaa5", "sha256": "665a3d919b315a0decffbffbcbacf112cee7152acaf137dd7afeb63180567dc9" }, "downloads": -1, "filename": "django_pythonic_menu-0.0.2.zip", "has_sig": false, "md5_digest": "55e36270e5c4c9c02bdea88582dddaa5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11442, "upload_time": "2016-08-09T20:52:16", "url": "https://files.pythonhosted.org/packages/ce/7f/2d47004d109fec0859df3c9c9c71d5c96b9b9940f421c940982d3d0ddeb3/django_pythonic_menu-0.0.2.zip" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "18ffa9a8b9e0a098f9d33ca749632684", "sha256": "93669b9565c4f8bd783c324ed32f984ffe5d5f4fca38b7bfeab9188cbbc4c7b2" }, "downloads": -1, "filename": "django_pythonic_menu-0.0.3.zip", "has_sig": false, "md5_digest": "18ffa9a8b9e0a098f9d33ca749632684", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11468, "upload_time": "2016-08-09T20:59:06", "url": "https://files.pythonhosted.org/packages/cb/49/4bf4d0a3d1bc59c6b35f2f25c2ba8c3fe14e272680bb974c3f16b9e2ec24/django_pythonic_menu-0.0.3.zip" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "0bfa08f4e69ceff1260580f6b8e981a2", "sha256": "3ee8e0ca3a319a9b732f513de01bf22fb571ca2bd3ec7a0a14df05b79d0cca98" }, "downloads": -1, "filename": "django_pythonic_menu-0.0.4.zip", "has_sig": false, "md5_digest": "0bfa08f4e69ceff1260580f6b8e981a2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11468, "upload_time": "2016-08-09T21:03:10", "url": "https://files.pythonhosted.org/packages/0d/03/9542880e2d55525c10b3117af34b98674e1c4e2aa78f565643ea7faa0036/django_pythonic_menu-0.0.4.zip" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "97861b680a8029593b485a89d1234545", "sha256": "2435c2196e0562ac03117bca5667143c9f3ba3b7274651e8cbf938ca4bf242ed" }, "downloads": -1, "filename": "django_pythonic_menu-0.0.5.zip", "has_sig": false, "md5_digest": "97861b680a8029593b485a89d1234545", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11506, "upload_time": "2016-08-09T21:15:37", "url": "https://files.pythonhosted.org/packages/ec/44/4d4c5e43ae866ef6448a78b1063d40b4baea1bfd8ca86e44e26c8cad9a98/django_pythonic_menu-0.0.5.zip" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "59ff76b9ac8c6fbd70e181028d451762", "sha256": "92cdfd6d30b96fea8a1028914e2e5ebec6ddb1db1dac47bf915c2eeb2944a48c" }, "downloads": -1, "filename": "django_pythonic_menu-0.0.6.zip", "has_sig": false, "md5_digest": "59ff76b9ac8c6fbd70e181028d451762", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11701, "upload_time": "2016-11-13T15:16:18", "url": "https://files.pythonhosted.org/packages/29/69/9376dd6333d3ac7050717dc47c6c7fa4b3f4743c5ad6e3f52d50cfb9e096/django_pythonic_menu-0.0.6.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "59ff76b9ac8c6fbd70e181028d451762", "sha256": "92cdfd6d30b96fea8a1028914e2e5ebec6ddb1db1dac47bf915c2eeb2944a48c" }, "downloads": -1, "filename": "django_pythonic_menu-0.0.6.zip", "has_sig": false, "md5_digest": "59ff76b9ac8c6fbd70e181028d451762", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11701, "upload_time": "2016-11-13T15:16:18", "url": "https://files.pythonhosted.org/packages/29/69/9376dd6333d3ac7050717dc47c6c7fa4b3f4743c5ad6e3f52d50cfb9e096/django_pythonic_menu-0.0.6.zip" } ] }