I have a model named ApplyGSP in models.py.
context = {'form': form,'apply_gsp_model':apply_gsp_model, 'Message': message, 'action': action}
if action == 'edit':
print("action is edit")
return render(request, 'EditApplyGSP.html', context)
else:
print("action is submit")
return render(request, 'ApplyGSP.html', context)
I want to traverse through the model instance in javascript using django template.
can some one suggest how to traverse through django queryset and access the database fields inside java script.
<script type="text/javascript">
</script>
Regards,
N.Dilip kumar.