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/*
static/CACHE/*
dss/localsettings.py
dss/storagesettings.py
dss/celery_settings.py
dss.conf
dss/debugsettings.py

View File

@@ -10,6 +10,7 @@ from utils import here
from localsettings import *
from pipelinesettings import *
from storagesettings import *
from paymentsettings import *
DEVELOPMENT = DEBUG
@@ -35,7 +36,7 @@ DATABASES = {
}
}
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"
DATABASES['default']['ENGINE'] = 'django.db.backends.sqlite3'
@@ -138,7 +139,7 @@ INSTALLED_APPS = (
'djrill',
'paypal.standard.ipn',
'django_user_agents',
'storages',
'storages',
#'backbone_tastypie',
)

View File

@@ -65,6 +65,7 @@ class Mix(BaseModel):
filetype = models.CharField(max_length=10, blank=False, default="mp3")
download_allowed = models.BooleanField(default=False)
duration = models.IntegerField(null=True, blank=True)
archive_path = models.CharField(max_length=2048, null=True, blank=True)
slug = models.SlugField()
genres = models.ManyToManyField(Genre)
@@ -163,6 +164,12 @@ class Mix(BaseModel):
def get_stream_path(self):
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
#used for podcast xml