{ "info": { "author": "Matt Dodge", "author_email": "mattedgod@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# PointOfVue\n\nA simple, opinionated way to incorporate VueJS into your Django applications\n\n## Installation\n\n```\npip install PointOfVue\n```\n\nAdd `pointofvue` to your Django installed apps:\n```python\nINSTALLED_APPS = [\n # other apps ...\n 'pointofvue',\n]\n```\n\n## Basic Usage\n\nIn your view, import `pointofvue` and send a `pointofvue.VueContext` instance to your template\n```python\nimport pointofvue\n\ndef view_handler(request):\n vue_ctx = pointofvue.VueContext()\n vue_ctx.set_data('var1', 'My value')\n\n return render(request, 'template.html', {\n vue_ctx: vue_ctx,\n })\n```\n\nIn your template, write your Vue code in a `#app` element and use `${` and `}` for accessing Vue data. Then load the `pointofvue` templates and call the `{% vue %}` tag with your `VueContext` to load VueJS and create an app.\n\n```html\n
\n The value of 'var1' is ${ var1 }\n
\n\n{% load pointofvue %}\n{% vue vue_ctx %}\n```\n\n## Custom JavaScript\n\nIt is likely that you won't be able to get away with just writing HTML Vue alone, you may need to define methods and other JS native entities in custom JavaScript.\n\n > **Note:** pointofvue encourages you to not write inline JavaScript in your Django HTML templates. Write separate JS files and serve them via staticfiles instead\n\nDefine a Vue entry point that exports your Vue data. It may look like this:\n```javascript\nimport MyCustomComponent from './my-component.js';\n\nconst components = {\n MyCustomComponent,\n};\n\nexport {\n components,\n};\n```\n\nBuild that JS file (target as a library if using vue-cli-service). Then register your script with the Python VueContext in your view:\n```python\nvue_ctx.add_script('myscript')\n```\n\nNow you can use your custom component in your template:\n```html\n
\n My Custom Component\n \n
\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mattdodge/PointOfVue", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pointofvue", "package_url": "https://pypi.org/project/pointofvue/", "platform": "", "project_url": "https://pypi.org/project/pointofvue/", "project_urls": { "Homepage": "https://github.com/mattdodge/PointOfVue" }, "release_url": "https://pypi.org/project/pointofvue/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "A simple, opinionated way to incorporate VueJS into Django apps", "version": "0.0.1" }, "last_serial": 5448669, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "ded3a6abed1a80004b0b8c289f8754a8", "sha256": "4374f2c5350a6e8fbf77fba92b4c0753ab10d67edc5f42e772a57ef6adf8da78" }, "downloads": -1, "filename": "pointofvue-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ded3a6abed1a80004b0b8c289f8754a8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3443, "upload_time": "2019-06-25T21:48:12", "url": "https://files.pythonhosted.org/packages/51/64/3ee360ef0da89c39ace89921d17dd34911021eae334514a574ed99836a57/pointofvue-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "857d2e07b98630c4fcd06f1444ffa2aa", "sha256": "8a5d162c411ac90c8f94722c5e2bbc35010125e6931fbbdd690189d104ab4f56" }, "downloads": -1, "filename": "pointofvue-0.0.1.tar.gz", "has_sig": false, "md5_digest": "857d2e07b98630c4fcd06f1444ffa2aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2849, "upload_time": "2019-06-25T21:48:14", "url": "https://files.pythonhosted.org/packages/68/d6/8bef51770cd1105cbb271f340856dd45a50af2d4ec18f1c0d68b0aa1d848/pointofvue-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ded3a6abed1a80004b0b8c289f8754a8", "sha256": "4374f2c5350a6e8fbf77fba92b4c0753ab10d67edc5f42e772a57ef6adf8da78" }, "downloads": -1, "filename": "pointofvue-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ded3a6abed1a80004b0b8c289f8754a8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3443, "upload_time": "2019-06-25T21:48:12", "url": "https://files.pythonhosted.org/packages/51/64/3ee360ef0da89c39ace89921d17dd34911021eae334514a574ed99836a57/pointofvue-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "857d2e07b98630c4fcd06f1444ffa2aa", "sha256": "8a5d162c411ac90c8f94722c5e2bbc35010125e6931fbbdd690189d104ab4f56" }, "downloads": -1, "filename": "pointofvue-0.0.1.tar.gz", "has_sig": false, "md5_digest": "857d2e07b98630c4fcd06f1444ffa2aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2849, "upload_time": "2019-06-25T21:48:14", "url": "https://files.pythonhosted.org/packages/68/d6/8bef51770cd1105cbb271f340856dd45a50af2d4ec18f1c0d68b0aa1d848/pointofvue-0.0.1.tar.gz" } ] }