How to elegantly create a datatable with Django ?
- by Inshim
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!