mirror of
https://github.com/fergalmoran/dss.api.git
synced 2026-01-04 07:34:09 +00:00
Merge conflicts
This commit is contained in:
15
api/views.py
15
api/views.py
@@ -25,6 +25,7 @@ from spa.models.activity import ActivityPlay
|
||||
from spa.models.mix import Mix
|
||||
from spa.models.comment import Comment
|
||||
from spa.models.notification import Notification
|
||||
from spa.models.show import Show
|
||||
from spa.models.userprofile import UserProfile
|
||||
|
||||
logger = logging.getLogger('spa')
|
||||
@@ -61,7 +62,7 @@ class CommentViewSet(viewsets.ModelViewSet):
|
||||
)
|
||||
except Mix.DoesNotExist:
|
||||
pass
|
||||
except Exception, ex:
|
||||
except Exception as ex:
|
||||
pass
|
||||
|
||||
|
||||
@@ -134,7 +135,7 @@ class AttachedImageUploadView(views.APIView):
|
||||
return Response(HTTP_202_ACCEPTED)
|
||||
except ObjectDoesNotExist:
|
||||
return Response(status=HTTP_404_NOT_FOUND)
|
||||
except Exception, ex:
|
||||
except Exception as ex:
|
||||
logger.exception(ex)
|
||||
|
||||
return Response(status=HTTP_401_UNAUTHORIZED)
|
||||
@@ -196,7 +197,7 @@ class PartialMixUploadView(views.APIView):
|
||||
).delay()
|
||||
logger.debug("Waveform task started")
|
||||
|
||||
except Exception, ex:
|
||||
except Exception as ex:
|
||||
logger.exception(ex)
|
||||
response = \
|
||||
'Unable to connect to rabbitmq, there may be a delay in getting your mix online'
|
||||
@@ -207,8 +208,8 @@ class PartialMixUploadView(views.APIView):
|
||||
'uid': uid
|
||||
}
|
||||
return Response(file_dict, HTTP_202_ACCEPTED)
|
||||
except Exception, ex:
|
||||
logger.exception(ex.message)
|
||||
except Exception as ex:
|
||||
logger.exception(ex)
|
||||
raise
|
||||
|
||||
|
||||
@@ -308,3 +309,7 @@ class MessageViewSet(viewsets.ModelViewSet):
|
||||
|
||||
def perform_update(self, serializer):
|
||||
self.__perform_write(serializer)
|
||||
|
||||
class ShowViewSet(viewsets.ModelViewSet):
|
||||
queryset = Show.objects.all()
|
||||
serializer_class = serializers.ShowSerializer
|
||||
|
||||
Reference in New Issue
Block a user