Fixed waveform url

This commit is contained in:
Fergal Moran
2015-10-29 21:52:06 +00:00
parent c3a94b2104
commit 6e0b118cd8
2 changed files with 2 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ MEDIA_ROOT = os.environ.get('MEDIA_ROOT', '/files/media')
STATIC_ROOT = os.environ.get('STATIC_ROOT', '/files/static')
CACHE_ROOT = os.environ.get('CACHE_ROOT', '/files/cache')
MEDIA_URL = os.environ.get('MEDIA_URL', 'http://deepsouthsounds.com/media') # '{0}media/'.format(CDN_URL)
MEDIA_URL = os.environ.get('MEDIA_URL', 'http://deepsouthsounds.com/media/') # '{0}media/'.format(CDN_URL)
REDIS_HOST = 'localhost'
BROKER_URL = os.environ.get('BROKER_URL', 'amqp://guest:guest@localhost:5672//')

View File

@@ -159,8 +159,7 @@ class Mix(BaseModel):
if self.waveform_generated:
waveform_root = settings.WAVEFORM_URL \
if hasattr(localsettings,
'WAVEFORM_URL') else "%swaveforms" % settings.MEDIA_URL
if hasattr(settings, 'WAVEFORM_URL') else "%swaveforms" % settings.MEDIA_URL
ret = "%s/%s%s.%s" % (waveform_root, self.uid, waveform_type, "png")
return url.urlclean(ret)