A significant Django tool: storages
Posted by Elf Sternberg as Uncategorized
If you work with Django for any period of time, the day comes when you’ll be accepting outside data from your users: files, images, and the like. Django provides only two places where you can store these items: in memory, or to a file. Django storages provides for two more critical locations: BLOBs in your SQL database (which you may want to do– never know), and most importantly, Amazon AWS S3. For my current work with a film library and catalog, having S3 be the storage solution has always been a bit of a kludge: producers would upload films to the server, and we’ve eventually get it into S3. Now, with AWS S3, Django Storages backed with the incredible BOTO library makes the entire process unbelievably easy.
Storages also supports storing content in the database, CouchDB, FTP, or anything else you can imagine. And the source code makes for excellent examples.
Also, if you use django-storages, consider looking at many of the branches on bitbucket, because there are variants of it for S3 that disable the HTTPS default for Cloudfront, which was important for us at Indieflix. Not everything coming out of Cloudfront has to run through SSL.