removing obsolete management call to upload notes to S3
authorBryan <btbonval@gmail.com>
Fri, 20 Feb 2015 01:48:06 +0000 (20:48 -0500)
committerBryan <btbonval@gmail.com>
Fri, 27 Feb 2015 01:08:12 +0000 (20:08 -0500)
karmaworld/apps/notes/management/commands/populate_s3.py [deleted file]

diff --git a/karmaworld/apps/notes/management/commands/populate_s3.py b/karmaworld/apps/notes/management/commands/populate_s3.py
deleted file mode 100644 (file)
index 9cc204f..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env python
-# -*- coding:utf8 -*-
-# Copyright (C) 2013  FinalsClub Foundation
-
-# This file is only temporary as Note.html data gets moved onto S3.
-# Once Note.html no longer exists, this function should be removed.
-
-import hashlib
-from cStringIO import StringIO
-
-from django.core.files.storage import default_storage
-from django.core.management.base import BaseCommand
-from karmaworld.apps.notes.models import Note
-from karmaworld.apps.notes import sanitizer
-
-class Command(BaseCommand):
-    args = 'none'
-    help = """
-           Upload Note.html to the S3 system.
-           """
-
-    def handle(self, *args, **kwargs):
-        for note in Note.objects.iterator():
-            if note.static_html:
-                # don't reprocess notes that are already on S3.
-                print "Skipping pre-uploaded {0}".format(str(note))
-                continue
-
-            # grab the html from inside the note and process it
-            html = sanitizer.sanitize_html(note.html, note.get_canonical_url())
-            html = sanitizer.sanitizer.set_canonical_rel(note.get_canonical_url())
-            # push clean HTML to S3
-            note.send_to_s3(html)