'Can I pass a list of objects into a session? Django/Python

I have data that does not need stored in a db. I have a list of results from an API that is made up of objects i created based off of what is returned by the api. I want to display results in an html table. When I paginate i lose all that data and want to pass the list of objects into the session to pass with each page. Is this possible?



Solution 1:[1]

You can store anything which can be serialized in the session. It's possible that you will have to restructure your "objects" or store the same data as dicts and lists.

Try it and see?

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 nigel222