[Django]-How to request GET parameters in templates for a list of files?(Django Zip File Download Issue)


request.GET.get('paths') returns a string representation of your list of paths, not a list object. The returned value would be like this "['/path/file1', 'path/file2']". When you iterate through paths, it actually iterates through each char in your string. That is why it first tries to find a directory with the name [.

To pass a list of file paths to a GET request, you would need to change your url to this


In your Python code, get the file paths with this


Leave a comment