how to pass a django model object to modal window
<p>I m looping over model object. and for every record i have a button to show respective modal window with specific record. but i dont know how to pass the object to that window.</p>

<p>{% for q in options %}</p>

<pre><code>  &lt;tr id="{{q.name}}" class="trow"&gt;
       &lt;td&gt;
        &lt;button id="btn_{{q.name}}" alt="{{q}}" class="btn modaleditbutton"&gt;Edit&lt;/button&gt;
       &lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>{% endfor %}</p>

<p>in following code i m trying to capture object but it is appearing as string. </p>

<pre><code>    ('.modaleditbutton').click(function(){

    var a = $(this).attr("alt");       

    $('#editmodal').modal('toggle');      

    return false;

});
</code></pre>
