R
R
rm root2020-05-27 23:38:22
Django
rm root, 2020-05-27 23:38:22

Django 3, the simplest bug. Error in the template, how to fix ???

I have an ajax handler passing id through data
and I want to pass this id to the url.
but i get this error
5ececfbc60928870745557.png

<div class="review_delete text-danger"></i><a href="{% url 'news:delete_review' `+data['id_comment']+` news.id %}" class="text-danger"><i class="fas fa-trash-alt mr-2"></i>Видалити</a></div>

if it's simple to shove it into the tag `<p>` +data['id_comment']+ `</p>`, then everything is fine:

what to do ???
MEAN :D

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2020-05-28
@sergey-gornostaev

Read the documentation more carefully. Understand the basic principles of web development. Realize that the template engine code and js code are programs in two different languages ​​that run on different machines at different times.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question