How to elegantly create a datatable with Django ?

Posted by Inshim on Stack Overflow See other posts from Stack Overflow or by Inshim
Published on 2010-06-09T20:48:32Z Indexed on 2010/06/09 20:52 UTC
Read the original article Hit count: 373

Here's a common situation that I have and wish to avoid creating tedious loops and fiddling with html tables:

I have a model Movie, which is has fkeys to Director and to Genre.

How can I elegantly render a simple data table that has on one axis the different Directors, on another axis the different Genres, and inside each cell the count of the movies filtered by the respective Director and Genre?

Thanks!

© Stack Overflow or respective owner

Related posts about django

Related posts about datatable