We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db84567 commit fc84d13Copy full SHA for fc84d13
cli/views.py
@@ -1,11 +1,6 @@
1
import os
2
from subprocess import *
3
4
-from django.shortcuts import render
5
-from django.contrib.auth.models import User, Group
6
-from rest_framework import viewsets
7
-from rest_framework import permissions
8
-
9
from rest_framework.response import Response
10
from rest_framework.views import APIView
11
@@ -23,3 +18,8 @@ def post(self, request):
23
18
outs, errs = proc.communicate()
24
19
output = outs if outs else errs
25
20
return Response({'output': output})
21
+
22
+class DataView(APIView):
+ """Request JSON data from sherlock resources."""
+ def get(self, request):
+ return Response(sherlock_data())
0 commit comments