「current.html」でajax経由からプルしようとしています
フォームを処理するビューは「form.html」をレンダリングします
「current.html」は次のようなものです。
<script>
// ajax that pulls the form on a#get_form click
// fills up div#mod_post with the result
</script>
<a id="get_form" href="{% url to the view that handles the form %}">get form</a>
<div id="mod_post" style="display:none;">
{% include "form.html" %}
</div>
ここまではすべて問題ありません...フォームが適切に取得されて表示されます。
「form.html」は次のようなものです。
<script type="text/javascript" src="/the/script/that/should/handle/the/post.js"></script>
<form id="mod_form" action="" method="POST" enctype="multipart/form-data">{% csrf_token %}
<table class="form">
{{ form.as_table }}
</table>
<input class="submit" type="submit" value="modifica">
</form>
唯一のことは、form.htmlがレンダリングされるときはいつでも、その部分が含まれることは決してないということです。
<script type="text/javascript" src="/the/script/that/should/handle/the/post.js">
</script>
私はここで何か間違ったことをしていますか、明らかにそうですが、それを見つけることはできません。
フィードバックは大歓迎です、ありがとう!