|
|
|
@ -1,8 +1,9 @@ |
|
|
|
import json |
|
|
|
import re |
|
|
|
|
|
|
|
from django.http import Http404, HttpResponse, HttpResponseGone, HttpResponseNotFound |
|
|
|
from rest_framework import permissions, status |
|
|
|
from rest_framework.generics import CreateAPIView, ListAPIView, RetrieveUpdateDestroyAPIView |
|
|
|
from rest_framework.generics import CreateAPIView, RetrieveUpdateDestroyAPIView |
|
|
|
from rest_framework.views import APIView |
|
|
|
from rest_framework.response import Response |
|
|
|
from PIL import Image |
|
|
|
@ -54,6 +55,15 @@ class UserResponseHandler(APIView): |
|
|
|
return Response(status=status.HTTP_200_OK) |
|
|
|
|
|
|
|
|
|
|
|
def court_location(request, city): |
|
|
|
data = { |
|
|
|
'city': city, |
|
|
|
'address': f'123 {city} St', |
|
|
|
'postal_code': 'V0A 0A0', |
|
|
|
} |
|
|
|
return HttpResponse(content=json.dumps(data), status=status.HTTP_200_OK) |
|
|
|
|
|
|
|
|
|
|
|
class DocumentCreateView(CreateAPIView): |
|
|
|
serializer_class = CreateDocumentSerializer |
|
|
|
permission_classes = [permissions.IsAuthenticated] |
|
|
|
|