{"id":19481631,"url":"https://github.com/mattdodge/pointofvue","last_synced_at":"2026-03-07T02:02:05.059Z","repository":{"id":57453908,"uuid":"193776897","full_name":"mattdodge/PointOfVue","owner":"mattdodge","description":"A simple, opinionated way to incorporate VueJS in Django applications","archived":false,"fork":false,"pushed_at":"2023-10-11T04:43:49.000Z","size":20,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T01:06:28.849Z","etag":null,"topics":["django","vuejs"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mattdodge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-06-25T20:14:52.000Z","updated_at":"2023-10-10T02:59:01.000Z","dependencies_parsed_at":"2023-10-11T06:13:33.256Z","dependency_job_id":null,"html_url":"https://github.com/mattdodge/PointOfVue","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"f7d6a93a4736a45efec4db999f4e59e54d4a50b4"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattdodge%2FPointOfVue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattdodge%2FPointOfVue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattdodge%2FPointOfVue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattdodge%2FPointOfVue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattdodge","download_url":"https://codeload.github.com/mattdodge/PointOfVue/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250844402,"owners_count":21496568,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","vuejs"],"created_at":"2024-11-10T20:05:53.228Z","updated_at":"2026-03-07T02:02:04.958Z","avatar_url":"https://github.com/mattdodge.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 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\u003cdiv id='app'\u003e\n    The value of 'var1' is \u003cb\u003e${ var1 }\u003c/b\u003e\n\u003c/div\u003e\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 \u003e **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\u003cdiv id=\"app\"\u003e\n    \u003cb\u003eMy Custom Component\u003c/b\u003e\n    \u003cMyCustomComponent /\u003e\n\u003c/div\u003e\n```\n\n## Development\n\n### Releasing\nI use [bump2version](https://github.com/c4urself/bump2version) to manage version bumping. This will update the version number in the library, commit it, and create a version tag.\n\n```bash\nbump2version minor\ngit push --follow-tags\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattdodge%2Fpointofvue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattdodge%2Fpointofvue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattdodge%2Fpointofvue/lists"}