Skip to content

Commit fc84d13

Browse files
committed
Add data view.
1 parent db84567 commit fc84d13

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cli/views.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
import os
22
from subprocess import *
33

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-
94
from rest_framework.response import Response
105
from rest_framework.views import APIView
116

@@ -23,3 +18,8 @@ def post(self, request):
2318
outs, errs = proc.communicate()
2419
output = outs if outs else errs
2520
return Response({'output': output})
21+
22+
class DataView(APIView):
23+
"""Request JSON data from sherlock resources."""
24+
def get(self, request):
25+
return Response(sherlock_data())

0 commit comments

Comments
 (0)