Skip to content

Tag: django

Implementing JS in Django templates

I have a list of ingredients, for every ingredient, I would like to give the option to delete the current ingredient via using a popup that asks the user “are you sure they want to delete this?” If confirmed, I want that ingredient to be deleted. Currently, no matter which ingredient I choose to d…

Using innerHTML to include HTML Django page not work

I am trying to include an HTML when a button is clicked in a Django project but the error a Uncaught SyntaxError: Invalid or unexpected token Here is the Javascript: The error showing is at this line of code as if the include code is not there at all. My question: How can I add this code through javascript an…