1. Waldemar Kornewald
  2. djangoappengine

Commits

Waldemar Kornewald  committed 33e26ae

added support for media generator during deploy.

  • Participants
  • Parent commits dd8af2b
  • Branches default

Comments (0)

Files changed (2)

File management/commands/deploy.py

View file
  • Ignore whitespace
 import sys
 import logging
 
+from django.conf import settings
+from django.core.management import call_command
 from django.core.management.base import BaseCommand
 
 def run_appcfg(argv):
     args = '[any appcfg.py options]'
 
     def run_from_argv(self, argv):
+        if 'mediagenerator' in settings.INSTALLED_APPS:
+            call_command('generatemedia')
         run_appcfg(argv)

File storage.py

View file
  • Ignore whitespace
     create_upload_url, BLOB_KEY_HEADER
 
 def prepare_upload(request, url, **kwargs):
-    return create_upload_url(url)
+    return create_upload_url(url), {}
 
 def serve_file(request, file, save_as, content_type, **kwargs):
     if hasattr(file, 'file') and hasattr(file.file, 'blobstore_info'):