It strikes me that python manage.py collectstatic pushes static files to S3 with the correct permissions and all that, but it also works just as well if the static directory is on the local file system.
Perhaps Note.send_to_s3 should be refactored to do whatever collectstatic does, which will make the code cleaner and more portable.
The current stuff is a bit of an ugly boto hack which displeases me. I'm the one who wrote it so I'm not hurting anyone's feelings, either.
If we can remove Note.send_to_s3 and make something more generic like Note.send_to_static, I think the world will be a better place.
It strikes me that
python manage.py collectstatic
pushes static files to S3 with the correct permissions and all that, but it also works just as well if the static directory is on the local file system.Perhaps
Note.send_to_s3
should be refactored to do whatevercollectstatic
does, which will make the code cleaner and more portable.The current stuff is a bit of an ugly boto hack which displeases me. I'm the one who wrote it so I'm not hurting anyone's feelings, either.
If we can remove
Note.send_to_s3
and make something more generic likeNote.send_to_static
, I think the world will be a better place.