VUE JS Reverse
Vue url handling for Django that doesn’t hurt.
Overview
Django Vue Reverse (a fork of Django Js Reverse) is a small django app that makes url handling of named urls (https://docs.djangoproject.com/en/dev/topics/http/urls/#naming-url-patterns) in javascript easy and non-annoying..
You can retrieve a named url:
urls.py:
path('company/update/company_id/<int:company_id>/', main.update_company, name='update_company')
in javascript like:
this.$urls.update_company(12)
Result:
company/update/company_id/12/
Requirements
python 3.6+
Installation
Install using pip …
pip install vue-js-reverse
... or clone the project from github.
git clone https://github.com/miklagard/vue-js-reverse
Add 'vue_js_reverse' to your INSTALLED_APPS setting.
INSTALLED_APPS = (
...
'vue_js_reverse',
)
Add library variables to settings.py file.
VUE_PLUGINS_DIR = os.path.join(settings.BASE_DIR, 'vue_frontend', 'src', 'plugins')
VUE_REVERSE_URL_PLUGIN = 'Urls.js'
Vue main.js
import Url from "@/plugins/Url"
Vue.use(Url)
Usage as static file
First generate static file by
./manage.py vue_js_reverse
If you change some urls or add an app and want to update the reverse.js file, run the command again.
After this add the file to your template
License
MIT https://raw.githubusercontent.com/miklagard/vue-js-reverse/master/LICENSE
Contact
Enjoy!
Metadata
Release files for vue-js-reverse 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| vue_js_reverse-0.1.1.tar.gz | 17.7 kB | Without provenance | Details |
Release files / vue_js_reverse-0.1.1.tar.gz
| Download URL | vue_js_reverse-0.1.1.tar.gz |
|---|---|
| Size | 17.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0519c7a7bcc08632804d73ec58dbd56dcf27f7f3f1041e13595d23cdaac802f0
|
|
BLAKE2b-256 checksum How to use checksums |
619de7105366f7ee15d9405b71b696b4489e51b30b89f2187b578af05707c7ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Security for vue-js-reverse 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.