Commit e0a12e87 authored by Rafal's avatar Rafal

change for data

parent e9268bad
# Create your views here.
from django.core.serializers import json
from django.http import HttpResponse, Http404
from rest_framework import viewsets, permissions
import rest_framework
......@@ -38,7 +39,7 @@ class APIViewSet(viewsets.ModelViewSet):
mod = __import__(name, fromlist=['API'])
api = mod.API(request)
data = api.execute(function)
print data
data = json.dumps(data[0])
return Response(data=data, content_type="application/json")
def get_queryset(self):
......
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