{ "info": { "author": "Peveri Martin", "author_email": "martinpeveri@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "django-var-js/README.rst\n======\nVar-js\n======\n\nVar-js is a simple Django application that allows communication \nvariables from the server to the client.\n\nInstalling\n----------\n\npip install django-var-js\n\nRequirements\n-----------\n\nJQuery\n\nQuick start\n-----------\n\n1. Include the var-js URLconf in your project urls.py like this::\n\n\turl(r'^', include('var_js.dj_var_js.urls')),\n\t\n2. In the view.py::\n\t\n\tfrom var_js.views import DjVarJs\n\n\tdef example(request):\n\t\t#Values\n\t\tvariable = \"To JavaScript\"\n\t\tdicc = {'key1': 'value1', 'key2': 'value2', 'key3': 'value3'}\n\t\t\n\t\t#Instance of class DjVarJs\n\t\tpyvar = DjVarJs()\n\n\t\t#Set values \n\t\tpyvar.set(\"variable\", variable , request)\n\t\tpyvar.set(\"dicc_django\", dicc, request)\n\n\t\treturn render_to_response('example.html', context_instance=RequestContext(request))\n\n3. In the template::\n\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t

App Django-var-js

\n\t\t\t\n\t\t\t
\n\t\t\t\n\t\t\n \t\n\n4. In the file .js::\n\n\tvar valor = DjVarJs.getKey(\"variable\");\n\t$(\"#key_js\").text(valor);\n\n\tvar arr = DjVarJs.getDict(\"dicc_django\");\n\t$(\"#dict_js\").text(\"Clave1: \" + arr['clave1'] + \", Clave2: \" + arr['clave2'] + \", Clave3: \" + arr['clave3']);\n\n5. Visit http://127.0.0.1:8000/example/", "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/mapeveri/django-var-js", "keywords": null, "license": "BSD License", "maintainer": null, "maintainer_email": null, "name": "django-var-js", "package_url": "https://pypi.org/project/django-var-js/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-var-js/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/mapeveri/django-var-js" }, "release_url": "https://pypi.org/project/django-var-js/1.1/", "requires_dist": null, "requires_python": null, "summary": "Application variables passed from the server to the client.", "version": "1.1" }, "last_serial": 1490123, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "ac4eab5b658fa27cf965e4367653c1d9", "sha256": "0279f32ad3134e5f5fca21b59e8f120ec33da90dd88e1f80b1ab2fe9c3d9b797" }, "downloads": -1, "filename": "django-var-js-0.1.tar.gz", "has_sig": false, "md5_digest": "ac4eab5b658fa27cf965e4367653c1d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3430, "upload_time": "2015-02-03T02:35:49", "url": "https://files.pythonhosted.org/packages/b5/ae/377c35c8b860f53419d2babb2b82b7035db0e9a2e0e8599ca37611f0a7d0/django-var-js-0.1.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "e4d096e9c6683b3e7ba583c661c58734", "sha256": "50c62188af94bb89d6811967047030093c838e05c2f1088769c6debb212fd585" }, "downloads": -1, "filename": "django-var-js-0.5.tar.gz", "has_sig": false, "md5_digest": "e4d096e9c6683b3e7ba583c661c58734", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3840, "upload_time": "2015-02-03T12:57:22", "url": "https://files.pythonhosted.org/packages/13/17/14b9dab2c8bcbe1a96415246aabd3dac22e61fbfe86c14df00473e1624a8/django-var-js-0.5.tar.gz" } ], "0.8": [ { "comment_text": "", "digests": { "md5": "a5437a806f52c61880b4c73c30cb971b", "sha256": "bd47ca99f6db03b5547c007de09f36a185bad8f16cb102d123a02292e07c8434" }, "downloads": -1, "filename": "django-var-js-0.8.tar.gz", "has_sig": false, "md5_digest": "a5437a806f52c61880b4c73c30cb971b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3413, "upload_time": "2015-02-09T20:37:18", "url": "https://files.pythonhosted.org/packages/a5/94/6a3707c865d8c901cb4b2cae08e82a102c3b454afe10bebc4730dfd5e037/django-var-js-0.8.tar.gz" } ], "0.9": [ { "comment_text": "", "digests": { "md5": "e2fff3da523fc66bd65af0771dd080f6", "sha256": "cac2f4340ac2ebf09ebb8b66027c74bbdcc8b53eb883605c67bffab4309f2639" }, "downloads": -1, "filename": "django-var-js-0.9.tar.gz", "has_sig": false, "md5_digest": "e2fff3da523fc66bd65af0771dd080f6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3432, "upload_time": "2015-02-09T21:05:15", "url": "https://files.pythonhosted.org/packages/f0/85/2512f8ad11ec57c75dcd046ade869e46331ba0e9ee949f4ba285cf87d508/django-var-js-0.9.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "f1488705e3aeec2861d8556dbb60d5ca", "sha256": "30eec62a3bdddd33faa9bb3907003db7b80349db2af7839c99b3723ac9930295" }, "downloads": -1, "filename": "django-var-js-1.0.tar.gz", "has_sig": false, "md5_digest": "f1488705e3aeec2861d8556dbb60d5ca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3449, "upload_time": "2015-02-09T22:59:39", "url": "https://files.pythonhosted.org/packages/0d/df/009e397bb55b50c18c78df010c206850f666b2a62908b67407d494ae8c33/django-var-js-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "12bb73f1e6d0ce8e07193467cefa6c2d", "sha256": "4c11a8b9010f8775d3640a2b8b4f046a1f5faa487744d50b3fb15204ac7b39d6" }, "downloads": -1, "filename": "django-var-js-1.1.tar.gz", "has_sig": false, "md5_digest": "12bb73f1e6d0ce8e07193467cefa6c2d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3544, "upload_time": "2015-04-03T20:53:07", "url": "https://files.pythonhosted.org/packages/c9/71/e4a2b94c2e23fe8acbbc1590bf086a97df16fa280f43cce6feb3c357b722/django-var-js-1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "12bb73f1e6d0ce8e07193467cefa6c2d", "sha256": "4c11a8b9010f8775d3640a2b8b4f046a1f5faa487744d50b3fb15204ac7b39d6" }, "downloads": -1, "filename": "django-var-js-1.1.tar.gz", "has_sig": false, "md5_digest": "12bb73f1e6d0ce8e07193467cefa6c2d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3544, "upload_time": "2015-04-03T20:53:07", "url": "https://files.pythonhosted.org/packages/c9/71/e4a2b94c2e23fe8acbbc1590bf086a97df16fa280f43cce6feb3c357b722/django-var-js-1.1.tar.gz" } ] }