"If you have more than one form in your page you can separate them by using action, so your view will not get multiple requests at the same time."
Any chance we can get an example of this? Like: how does the view.py code change to accommodate this, and how does the .js also change? I've experimented a bit, but I'm kind of lost.
"If you have more than one form in your page you can separate them by using action, so your view will not get multiple requests at the same time."
Any chance we can get an example of this? Like: how does the view.py code change to accommodate this, and how does the .js also change? I've experimented a bit, but I'm kind of lost.
what about "data-name" attr? You can assigment an attribute that starts with "data-" to separate forms in ajax section.
For instance:
//html
//js
"""
data: {'content_id': $(this).attr('data-animal-type'),
'operation':'add_new_animal',
//We will got "fish" value.
"""
w3schools.com/tags/att_data-.asp