mirror of
https://github.com/fergalmoran/dss.api.git
synced 2026-01-05 08:04:53 +00:00
Activity fixes
This commit is contained in:
@@ -8,4 +8,4 @@
|
||||
python manage.py get_avatars
|
||||
|
||||
#jiggle the waveforms
|
||||
python manage.py zoom_convert_waveforms
|
||||
python manage.py zoom_convert_waveforms
|
||||
@@ -207,8 +207,13 @@ class ActivityViewSet(viewsets.ModelViewSet):
|
||||
if not user.is_authenticated():
|
||||
raise PermissionDenied("Not allowed")
|
||||
|
||||
return ActivityPlay.objects.filter(mix__user=user).order_by("-id")
|
||||
ret = ActivityPlay.objects.filter(mix__user=user).order_by("-id")
|
||||
|
||||
if len(ret) >0:
|
||||
logger.debug("Activity returned: %s".format(ret[0].get_object_slug()))
|
||||
return ret
|
||||
else:
|
||||
return []
|
||||
|
||||
class DownloadItemView(views.APIView):
|
||||
def get(self, request, *args, **kwargs):
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import os
|
||||
import localsettings
|
||||
from dss import localsettings
|
||||
|
||||
if os.name == 'posix':
|
||||
LOG_FILE = '/tmp/dss.log'
|
||||
LOG_FILE = localsettings.DSS_TEMP_PATH + '/dss.log'
|
||||
else:
|
||||
LOG_FILE = 'c:\\temp\\dss.log'
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@ from django.core.urlresolvers import reverse_lazy
|
||||
import djcelery
|
||||
from django.conf import global_settings
|
||||
|
||||
from dss import logsettings
|
||||
from utils import here
|
||||
|
||||
from localsettings import *
|
||||
from storagesettings import *
|
||||
from paymentsettings import *
|
||||
from logsettings import *
|
||||
from psa import *
|
||||
|
||||
DEVELOPMENT = DEBUG
|
||||
@@ -144,8 +144,6 @@ INSTALLED_APPS = (
|
||||
LOGIN_REDIRECT_URL = reverse_lazy('home')
|
||||
LOGOUT_URL = reverse_lazy('home')
|
||||
|
||||
LOGGING = logsettings.LOGGING
|
||||
|
||||
FACEBOOK_APP_ID = '154504534677009'
|
||||
|
||||
djcelery.setup_loader()
|
||||
|
||||
@@ -208,6 +208,9 @@ class ActivityPlay(Activity):
|
||||
def get_target_user(self):
|
||||
return self.mix.user
|
||||
|
||||
def get_object_slug(self):
|
||||
return self.mix.slug
|
||||
|
||||
def get_object_name(self):
|
||||
return self.mix.title
|
||||
|
||||
|
||||
Reference in New Issue
Block a user