There is a website where I loop elements of a table like this:
<ul> {% for topic in topics %} <li><a href="/topic/{{ topic.pk }}">{{ topic.subject}}<br /> { topic.text}}</a></li> {% endfor %} </ul>
I want to add a button near each element, when clicked, which topic.subject, topic.text of this particular cell will be added to another earlier created table. Using only Django while doing this.
You can call a function in views.py
by pressing a button, but how do you pass it into the subject u text? Maybe you can somehow build a post-request using this data. I have so far failed.
Thank you all in advance.
{{ topic.text}}
. And so, yes, here js + ajax is needed, most likely. - m0nte-cr1st0 2:38 pm