私はhtmlでこのようなフォームを持っています:
<form class="well span9 offset1" action="/summary/" method="post">
{% csrf_token %}
<fieldset>
<label class="control-label" for ="inputIcon">Type or paste your text into box:</label>
</fieldset>
<div class="controls">
<div class="input-prepend">
<textarea rows="15" class="span9"></textarea>
</div>
</div>
<fieldset>
<input type="checkbox" name="input_text" />
Send me the copy of summary by e-mail.
</fieldset><br />
<a href="#summaryModal" data-toggle="modal"><button type="submit" class="btn btn-primary offset3">Summarize</button></a>
<button type="reset" class="btn btn-danger">Reset</button>
</form>
ユーザーがフォームを送信している間、このフォームをサマリー関数で処理し、ブートストラップのモーダルで結果を関数に返します。ただし、関数に移動する代わりに、ポップアップ(モーダル)を開くだけです。結果を持つ関数からこの同じテンプレートに戻ります。これどうやってするの?Ajax は必要ですか?