{ "info": { "author": "Alexander Bohn", "author_email": "fish2000@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: MIT License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python :: 2.6" ], "description": "django-url-namespaces\n=====================\n\nThis is a somewhat-functional attempt to bring a more intuitive and less spaghettified syntax to Django's URLConf. It implements a declarative class-based syntax:\n\n\n # urls.py (n\u00e9e 'URLConf')\n\n from django.conf.urls import patterns\n from url_namespaces import (Namespace, View, Redirect, \\\n ReverseRedirect, KeywordReverseRedirect)\n\n\n class MyOtherURLs(Namespace):\n \"\"\" URL namespaces are classes, \n the URLs they contain are properties\n of those classes. \"\"\"\n \n class Meta:\n namespace = 'testapp:views'\n app_name = 'testapp'\n view_prefix = ''\n \n rss = View(\n r'^(?P[\\w\\-]+)/rss/?$',\n 'testapp.views.blogrss',\n arg='yo', other_arg='dogg')\n \n index = View(\n r'^(?P[\\w\\-]+)/$',\n 'testapp.views.blogpage')\n \n entry = View(\n r'^(?P[\\w\\-]+)/(?P[\\w\\-]+)/?$',\n 'testapp.views.blogentrypage')\n \n \n class MyURLs(Namespace):\n \"\"\" Namespaces can be nested \"\"\"\n \n class Meta:\n namespace = 'testapp'\n app_name = 'testapp'\n view_prefix = ''\n \n pages = MyOtherURLs(r'^/pages/')\n \n elsewhere = Redirect(\n r'^/yodogg?',\n \"http://www.yodogg.com/\")\n \n root = ReverseRedirect(\n r'^/?',\n 'testapp:index', blog=\"test\")\n \n entry_redirect = ReverseRedirect(\n r'^blog/(?P[\\w\\-]+)/(?P[\\w\\-]+)/?$',\n 'testapp:entry', blog=\"%(blog)s\", entry=\"%(entry)s\")\n \n entry_redirect_again = KeywordReverseRedirect(\n r'^blog/(?P[\\w\\-]+)/(?P[\\w\\-]+)/?$',\n 'testapp:entry')\n\n # These classes generate standard URL patterns\n # and use url(), reverse(), RegexURLResolver;\n # the project aims for compatibility with Django's\n # URLConf structures. \n \n urlpatterns = patterns('',\n MyURLs(r'^/?').connect('testapp'))\n\n\nDjano-URL-Namespaces implements a host of combinator objects, representing intuitive ideas e.g. `View`, `Redirect`, `Namespace` &c,\nwhich can be modularly rearranged without the worries incumbent in getting ones' hands dirty with the rather fragile Django-native\nURLConf syntax.\n\nAt the time of writing the project is in a state of somewhat indeterminate disrepair; namespaces don't nest quite right, there's a lot of sketchy code commented out and not enough docstrings, etc. If this is the sort of thing that floats your boat, know that I never turn away an entertaining pull-request, indeed!\n", "description_content_type": null, "docs_url": null, "download_url": "http://github.com/fish2000/django-url-namespaces/zipball/master", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/fish2000/django-url-namespaces/", "keywords": "python django url urlconf config datastructures syntax", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-url-namespaces", "package_url": "https://pypi.org/project/django-url-namespaces/", "platform": "any", "project_url": "https://pypi.org/project/django-url-namespaces/", "project_urls": { "Download": "http://github.com/fish2000/django-url-namespaces/zipball/master", "Homepage": "http://github.com/fish2000/django-url-namespaces/" }, "release_url": "https://pypi.org/project/django-url-namespaces/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Declarative class-based datastructures, for simple and flexible URLConfs in Django.", "version": "0.1.0" }, "last_serial": 790942, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "4fef15ca007f4107d3d2014f408a7131", "sha256": "2b8e6dd2b00570466e597fad9badd2cf464ff7f9c498e2250832f500cf34308f" }, "downloads": -1, "filename": "django-url-namespaces-0.1.0.tar.gz", "has_sig": false, "md5_digest": "4fef15ca007f4107d3d2014f408a7131", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8864, "upload_time": "2012-10-02T09:14:05", "url": "https://files.pythonhosted.org/packages/33/ff/d170d5ae6ae4c42c99e9c3645b8d70090b15e7bfc3652b4793b445afbc13/django-url-namespaces-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4fef15ca007f4107d3d2014f408a7131", "sha256": "2b8e6dd2b00570466e597fad9badd2cf464ff7f9c498e2250832f500cf34308f" }, "downloads": -1, "filename": "django-url-namespaces-0.1.0.tar.gz", "has_sig": false, "md5_digest": "4fef15ca007f4107d3d2014f408a7131", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8864, "upload_time": "2012-10-02T09:14:05", "url": "https://files.pythonhosted.org/packages/33/ff/d170d5ae6ae4c42c99e9c3645b8d70090b15e7bfc3652b4793b445afbc13/django-url-namespaces-0.1.0.tar.gz" } ] }