getting some mixed codecs, passthrough filters to clean up maybe
authorBryan <btbonval@gmail.com>
Tue, 14 Jan 2014 09:06:10 +0000 (04:06 -0500)
committerBryan <btbonval@gmail.com>
Thu, 16 Jan 2014 01:30:33 +0000 (20:30 -0500)
karmaworld/apps/notes/management/commands/populate_s3.py

index f39b9ff027fe4a170aeba72d091bdadd0faf23e9..632075cc7e471114cc584585341e0f5ec54dcb83 100644 (file)
@@ -38,8 +38,10 @@ class Command(BaseCommand):
             # This is a pretty ugly hackified answer to some s3boto shortcomings
             # and some decent default settings chosen by django-storages.
     
+            print "Processing {0}".format(filepath)
+            html = note.filter_html(html)
             # S3 upload wants a file-like object.
-            htmlflo = StringIO(note.html)
+            htmlflo = StringIO(html)
             # Create the new key (key == filename in S3 bucket)
             newkey = default_storage.bucket.new(filepath)
             # Upload data!