{ "info": { "author": "luyikei", "author_email": "luyikei.qmltu@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "*******************\ndjango-dictpatterns\n*******************\n\nIn urls.py, you can write urlpatterns by using dictionary.\n\n.. code-block:: python\n\n from django.conf.urls import include\n from django.contrib import admin\n admin.autodiscover()\n\n from dictpatterns.urls import DictPatterns\n\n UrlDictPatterns = DictPatterns(\n {\n r'^': ('testapp.views.home', 'home',\n {\n r'test/': ('testapp.views.test', 'test',\n {\n r'(?P\\d*)/': ('testapp.views.test_n', 'test_n',\n {\n r'd/': ('testapp.views.test_d', 'test_d')\n }\n )\n }\n ),\n r'admin/': (include(admin.site.urls), 'admin')\n }\n )\n }\n )\n\n urlpatterns = UrlDictPatterns.to_patterns()\n\nIn template\n===========\n\nBecause of this format, you can trace the parent url of a page.\nYou can display the parent url in template.\n\n.. code-block:: html\n\n {% load dict_url_tools %}\n\n Now :\n
\n {% this_url %}\n
\n Parent :\n
\n {% parent_url %}\n\nSettings\n========\n\nMake sure of writing DictPatterns in your urls which is designated as ROOT_URLCONF. \nAnd designate the root of DictPatterns as ROOT_DICTPATTERNS_NAME in settings.py if you need. Default value is \"UrlDictPatterns\".\n\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/luyikei/django-dictpatterns/archive/0.2.1.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/luyikei/django-dictpatterns", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-dictpatterns", "package_url": "https://pypi.org/project/django-dictpatterns/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-dictpatterns/", "project_urls": { "Download": "https://github.com/luyikei/django-dictpatterns/archive/0.2.1.zip", "Homepage": "https://github.com/luyikei/django-dictpatterns" }, "release_url": "https://pypi.org/project/django-dictpatterns/0.2.1/", "requires_dist": null, "requires_python": null, "summary": "This makes your application be able to write simple urlpatterns with dictionary for Django", "version": "0.2.1" }, "last_serial": 1052745, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "0767a9bee73a0e325559a40345247e1d", "sha256": "b3a53a4d8dae2a089a283c8ea5e6579a8541c4eaedccf4061ab36acff292203b" }, "downloads": -1, "filename": "django-dictpatterns-0.1.tar.gz", "has_sig": false, "md5_digest": "0767a9bee73a0e325559a40345247e1d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3348, "upload_time": "2014-04-06T06:26:01", "url": "https://files.pythonhosted.org/packages/35/32/b5b8c09b8e4869f38a99e90c1f4d5e70bc7a00dcbffece9a3df333c3e857/django-dictpatterns-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "fb9b13c89c961ac71161ce6266a11318", "sha256": "28ea8abfd26ea5a22bc31feafa626d25125bb370d95180d4bb110e49860e7882" }, "downloads": -1, "filename": "django-dictpatterns-0.2.tar.gz", "has_sig": false, "md5_digest": "fb9b13c89c961ac71161ce6266a11318", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3349, "upload_time": "2014-04-06T06:39:36", "url": "https://files.pythonhosted.org/packages/55/99/abf1245bbba2eb938a9079a81694da1b093f1f4750dbcfe21e34b7c25337/django-dictpatterns-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "f716f8635afe59e8438c60c297234e6c", "sha256": "16257476194a69e35f909107f10a368b5e66e0e149a2de7b3a410ecbf0932d8e" }, "downloads": -1, "filename": "django-dictpatterns-0.2.1.tar.gz", "has_sig": false, "md5_digest": "f716f8635afe59e8438c60c297234e6c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3359, "upload_time": "2014-04-06T15:11:28", "url": "https://files.pythonhosted.org/packages/99/f6/26c0ed5a170b43fde826e328447c910daf569d3927653992865fcc1e4ed9/django-dictpatterns-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f716f8635afe59e8438c60c297234e6c", "sha256": "16257476194a69e35f909107f10a368b5e66e0e149a2de7b3a410ecbf0932d8e" }, "downloads": -1, "filename": "django-dictpatterns-0.2.1.tar.gz", "has_sig": false, "md5_digest": "f716f8635afe59e8438c60c297234e6c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3359, "upload_time": "2014-04-06T15:11:28", "url": "https://files.pythonhosted.org/packages/99/f6/26c0ed5a170b43fde826e328447c910daf569d3927653992865fcc1e4ed9/django-dictpatterns-0.2.1.tar.gz" } ] }