From: Bryan Date: Tue, 14 Jan 2014 09:01:07 +0000 (-0500) Subject: fixing html location and adding prints X-Git-Tag: release-20150131~240^2~5 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=78746337c26558a9bd310a731b09cdf5e438d40c;p=oweals%2Fkarmaworld.git fixing html location and adding prints --- diff --git a/karmaworld/apps/notes/management/commands/populate_s3.py b/karmaworld/apps/notes/management/commands/populate_s3.py index 9974125..f39b9ff 100644 --- a/karmaworld/apps/notes/management/commands/populate_s3.py +++ b/karmaworld/apps/notes/management/commands/populate_s3.py @@ -22,6 +22,7 @@ class Command(BaseCommand): for note in Note.objects.iterator(): if note.static_html: # don't reprocess notes that are already on S3. + print "Skipping {0}".format(str(note)) continue filepath = note.get_relative_s3_path() @@ -29,6 +30,7 @@ class Command(BaseCommand): # HTML file is already uploaded if its slug is already there. note.static_html = True note.save() + print "Marking {0} as uploaded.".format(filepath) continue # Copy pasta! @@ -37,7 +39,7 @@ class Command(BaseCommand): # and some decent default settings chosen by django-storages. # S3 upload wants a file-like object. - htmlflo = StringIO(html) + htmlflo = StringIO(note.html) # Create the new key (key == filename in S3 bucket) newkey = default_storage.bucket.new(filepath) # Upload data!