Skip to content
Advertisement

Python, Django: how to get checked table rows into lists?

Good evening,

I’m hoping someone knows an answer to my problem of getting all checked rows inside a table into a multidimensional list (after submit)?

I know I can do something like this to get – for example – all the checked ids into a list:

template:

JavaScript

views.py

JavaScript

But as mentioned, this will only get me a list of the checked ids! Is there a way to get all the data of the row into a multidimensional list, for example like..?

JavaScript

Thanks for all your help and a good night!

Advertisement

Answer

I’d recommend creating a queryset to pull the instances from the DB.

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement