[Answer]-Store a list in request.session in one view and retrieve it in another view django

1👍

You have two options:

  1. Client side RESTful – This is a RESTful solution but may require a bit more work. You can retrieve the data in the first request to the client and after selecting you can send the selected rows back to the server for processing, CSV etc.

  2. Caching: In the first request you can cache your data on the server using a django file system or memcached. In the second request use the cache key (which would be the user session key + some timestamp + whatever else) to fetch the data and store in the db.

If it’s a lot of data option 2 may be better.

👤Sid

Leave a comment