Friday, July 23, 2010

Django zip files (create dynamic in-memory archives with Python's zipfile)

3 comments:

  1. Awesome. This solved my problem. Django's documentation tells you to pass data like HttpResponse(data, mimetype=mimetype), but with that i kept generating a corrupted zip says windows. Cheers.

    ReplyDelete
  2. Awesome, works like a charm. I struggled for 2 hours and then I found this post. Looking at the above code, I fixed the bugs in my code.

    ReplyDelete
  3. This works, very easy. But how will I save files coming from a database?

    ReplyDelete