Commit 192b3f0d authored by Rafal's avatar Rafal

add another type of response (xD Rosiek)

parent 73c5fe4f
...@@ -30,6 +30,7 @@ class APIViewSet(viewsets.ModelViewSet): ...@@ -30,6 +30,7 @@ class APIViewSet(viewsets.ModelViewSet):
def test(request, id, function, slash): def test(request, id, function, slash):
if function == 'add': if function == 'add':
APIViewSet.add(request, id) APIViewSet.add(request, id)
return HttpResponse(status=rest_framework.status.HTTP_200_OK)
try: try:
object = API.objects.get(pk=id) object = API.objects.get(pk=id)
except Exception as e: except Exception as e:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment