I found a trick that might work under most circumstances:
var url_mask = "{% url 'someview' arg1=12345 %}".replace(/12345/, tmp.toString());
It’s clean, and it doesn’t break DRY principle.
More Related Contents:
- How to pass parameter in url? pl. explain with example?
- How can I get query string values in JavaScript?
- Get escaped URL parameter
- Is there any way to specify a suggested filename when using data: URI?
- Django Template Variables and Javascript
- Change URL parameters and specify defaults using JavaScript
- AngularJS with Django – Conflicting template tags
- URL hash-bang (#!/) prefix instead of simple hash (#/) in Angular 1.6
- How can I get the destination URL for the onbeforeunload event?
- How to get the anchor from the URL using jQuery?
- How to create query parameters in Javascript?
- Parsing URL hash/fragment identifier with JavaScript
- Get query string parameters url values with jQuery / Javascript (querystring)
- Passing Python Data to JavaScript via Django
- SecurityError: The operation is insecure – window.history.pushState()
- Javascript Image Url Verify
- jQuery – Can threads/asynchronous be done?
- Sending user to their browser’s Home Page using Javascript
- Regular Expression – Extract subdomain & domain
- Angular url plus sign converting to space
- How to change the URL displayed in the browser without leaving the page
- How to test if a URL string is absolute or relative?
- REGEX: Capture Filename from URL without file extension
- Is there any way to download csv file from “website button click” using Python?
- How to pass an array in Django to a template and use it with JavaScript
- Passing data from Django to D3
- Make a JavaScript array from URL
- jQuery add class based on page URL
- Checking a Url in Jquery/Javascript
- Django: passing JSON from view to template