django - Indenting a nested form in an HTML template -
this may more of html question there django code in html template. have list of teachers , nested form contain students associated each teacher. there way indent student list when it's being rendered underneath teacher? don't know put html code. i've tried few things in various places nothing indents.
<div class="form-block"> {{ teachers.management_form }} {% teacher in teachers.forms %} {{ teacher }} {% if teacher.nested %} {% studentformset in teacher.nested %} {{ studentformset.as_table }} {% endfor %} {% endif %} {% endfor %} </div>
browser source snippet
<option value="50">dd</option> </select></td></tr> <tr><th><label for="id_value_35-0-student">student names:</label></th><td> <input id="id_value_35-0-student" type="text" name="value_35-0-student" value="2" maxlength="50" /><input type="hidden" name="value_35-0-id" value="14" id="id_value_35-0-id" /></td></tr> <tr><th><label for="id_value_35-1- student">teacher:</label></th><td><select name="value_35-1-student" id="id_value_35-1-student"> <option value="">---------</option> <option value="1">df</option> <option value="2">df</option>
Comments
Post a Comment