document.addEventListener("DOMContentLoaded", function () {
try {
var progressUrl = "{% url 'celery_progress:task_status' task_id %}";
CeleryProgressBar.initProgressBar(progressUrl);
}
catch(err) {
}
As you can see from the above code in my index.html I'm trying to catch the exception in my title using a try catch statement in javascript. However, as the error is occuring in python...how do you modify the above code to say "if no error do this, if not":
{{index | safe}}
(Or just catch the exception and do nothing)