Initial commit

This commit is contained in:
Fergal Moran
2015-04-30 23:17:58 +01:00
commit 6f9f29f5fc
193 changed files with 23428 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
from django.core.management.base import NoArgsCommand
from core.utils.cdn import upload_to_azure
from spa.models import Mix
class Command(NoArgsCommand):
def handle_noargs(self, **options):
try:
mixes = Mix.objects.filter(archive_updated=False)
for mix in mixes:
blob_name, download_name = mix.get_cdn_details()
upload_to_azure(blob_name, download_name)
mix.archive_updated = True
mix.save()
except Exception, ex:
print "Fatal error, bailing. {0}".format(ex.message)