I get a simple tag to show the table of any model arrays:
{% Table city_list%}
Does anyone see such things?
You can try the app, so that you book the following model:
column (name = 'title') author = table. Columns (Data =============================================== == <'Author__name') Class Meta: Model = Book # initial_queryset = Ideas in your thoughts = Book.objects.all (Books) = Booklet (initial_quaestrate) Returns Render_to_propins ('table.html', {'table': books}) # Table.html & lt; Table & gt; & Lt ;! - Table title - & gt; & Lt; TR & gt; For table {table.column%},% lt; Th & gt; {{Column}} & lt; / Th & gt; {% Endfor%} & lt; / Tr & gt; & Lt ;! - table rows - & gt; {% Row in table.rows%} & lt; Tr & gt; {% Value in row%} & lt; Td> {{Value}} & lt; / Td> {% Endfor%} & lt; / Tr & gt; {% Endfor%} & lt; / Table & gt; I think the above is more beautiful and self explanatory than {% table book_list%}
Comments
Post a Comment