Azure storage fixes

This commit is contained in:
Fergal Moran
2014-08-26 18:55:23 +01:00
parent 250882752a
commit 70d495bfaf
3 changed files with 11 additions and 2 deletions

1
.gitignore vendored
View File

@@ -12,6 +12,7 @@ build/*
_working/* _working/*
static/CACHE/* static/CACHE/*
dss/localsettings.py dss/localsettings.py
dss/storagesettings.py
dss/celery_settings.py dss/celery_settings.py
dss.conf dss.conf
dss/debugsettings.py dss/debugsettings.py

View File

@@ -10,6 +10,7 @@ from utils import here
from localsettings import * from localsettings import *
from pipelinesettings import * from pipelinesettings import *
from storagesettings import *
from paymentsettings import * from paymentsettings import *
DEVELOPMENT = DEBUG DEVELOPMENT = DEBUG
@@ -35,7 +36,7 @@ DATABASES = {
} }
} }
import sys import sys
if 'test' in sys.argv or 'test_coverage' in sys.argv: #Covers regular testing and django-coverage if 'test' in sys.argv or 'test_coverage' in sys.argv:
print "Testing" print "Testing"
DATABASES['default']['ENGINE'] = 'django.db.backends.sqlite3' DATABASES['default']['ENGINE'] = 'django.db.backends.sqlite3'

View File

@@ -65,6 +65,7 @@ class Mix(BaseModel):
filetype = models.CharField(max_length=10, blank=False, default="mp3") filetype = models.CharField(max_length=10, blank=False, default="mp3")
download_allowed = models.BooleanField(default=False) download_allowed = models.BooleanField(default=False)
duration = models.IntegerField(null=True, blank=True) duration = models.IntegerField(null=True, blank=True)
archive_path = models.CharField(max_length=2048, null=True, blank=True)
slug = models.SlugField() slug = models.SlugField()
genres = models.ManyToManyField(Genre) genres = models.ManyToManyField(Genre)
@@ -163,6 +164,12 @@ class Mix(BaseModel):
def get_stream_path(self): def get_stream_path(self):
ret = url_path_join(localsettings.STREAM_URL, "%s.mp3" % self.uid) ret = url_path_join(localsettings.STREAM_URL, "%s.mp3" % self.uid)
"""
if self.archive_path in [None, '']:
ret = url_path_join(localsettings.STREAM_URL, "%s.mp3" % self.uid)
else:
ret = self.archive_path
"""
return ret return ret
#used for podcast xml #used for podcast xml