You can put the template in a <script> tag in plot_detail.html and grab it by id.