{
"info": {
"author": "Vebjorn Ljosa",
"author_email": "vebjorn@ljosa.com",
"bugtrack_url": null,
"classifiers": [
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Utilities"
],
"description": "=================================\ndjango_js_utils - Django JS Utils\n=================================\n\ndjango_js_utils is a small utility library that aims to provide JavaScript/Django developers with\na few utilities that will help the development of RIA on top of a\nDjango Backend.\n\nReversing Django Urls from Javascript\n-------------------------------------\nWhy is this useful\n******************\nOne of the pillars of Django is DRY principle and hardcoding your urls in Javascript is violating that principle.\n\nMoreover, building parametrized urls on the fly is error-prone and ugly.\n\nWhat is included\n****************\nA snippet of Javascript implementation of Django reverse function that can be found in django_js_utils.js\n\nA view jsurls to generate a list of all of your Django urls.\n\nInstallation and usage\n**********************\n\n1. Add django_js_utils to your python path and add the django_js_utils application to your INSTALLED_APPS\n\n2. Add the jsurls view to your URL patterns, e.g.,\n\n::\n\n (r'^jsurls.js$', 'django_js_utils.views.jsurls', {}, 'jsurls'),\n\n3. Load the static django_js_utils.js (which contains the reverse function) and the dynamically-generated jsurls.js from every web page where you plan to use the reverse function (likely just your base.html template). Example:\n\n::\n\n \n \n\n4. In your JavaScript code, reverse URLs as follows:\n\n::\n\n django_js_utils.urls.resolve('dashboard')\n django_js_utils.urls.resolve('time_edit', { project_id: 1, time_id: 2 })\n\nFor more information about usage, see example.html\n\n\nTO-DO\n------\n1. Handle the unnamed Django urls that result in <> in urls.js file, but are not handled in Javascript resolver.\n\n2. Write unit tests\n\n3. Promote the code",
"description_content_type": null,
"docs_url": null,
"download_url": "UNKNOWN",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "UNKNOWN",
"keywords": null,
"license": "UNKNOWN",
"maintainer": null,
"maintainer_email": null,
"name": "django-js-utils",
"package_url": "https://pypi.org/project/django-js-utils/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/django-js-utils/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "UNKNOWN"
},
"release_url": "https://pypi.org/project/django-js-utils/0.0.5dev/",
"requires_dist": null,
"requires_python": null,
"summary": "Utility library to help development of RIA on top of a Django backend",
"version": "0.0.5dev"
},
"last_serial": 789921,
"releases": {
"0.0.5dev": [
{
"comment_text": "",
"digests": {
"md5": "dbf2c96d4d913bd470d424cc4b27c1ed",
"sha256": "3e0caf39b26519711143b14c0e94d6ee8b21c1a5a1756f33c841ce918b6a7559"
},
"downloads": -1,
"filename": "django-js-utils-0.0.5dev.tar.gz",
"has_sig": false,
"md5_digest": "dbf2c96d4d913bd470d424cc4b27c1ed",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3598,
"upload_time": "2012-09-07T12:52:32",
"url": "https://files.pythonhosted.org/packages/d6/72/350e8c2c9e9f77f8a0b2bcd6c5afcf115d042c4e79295ebc7153d6e1b680/django-js-utils-0.0.5dev.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "dbf2c96d4d913bd470d424cc4b27c1ed",
"sha256": "3e0caf39b26519711143b14c0e94d6ee8b21c1a5a1756f33c841ce918b6a7559"
},
"downloads": -1,
"filename": "django-js-utils-0.0.5dev.tar.gz",
"has_sig": false,
"md5_digest": "dbf2c96d4d913bd470d424cc4b27c1ed",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3598,
"upload_time": "2012-09-07T12:52:32",
"url": "https://files.pythonhosted.org/packages/d6/72/350e8c2c9e9f77f8a0b2bcd6c5afcf115d042c4e79295ebc7153d6e1b680/django-js-utils-0.0.5dev.tar.gz"
}
]
}