29 lines
683 B
Python

from django.shortcuts import render
from django.http import HttpResponse, JsonResponse
def index(response):
return HttpResponse("Welcome to siMed Migration")
def migration_home(request):
return render(request,'migration.html')
def api_home(request,endpoint, params={"message": "Your JSON Repsonse"}):
body = request.body
data = {}
try:
data = json.loads(body)
except:
pass
print(request.GET)
print(data)
data['params'] = dict(request.GET)
data['headers'] = dict(request.headers)
data['content_type'] = request.content_type
return JsonResponse(data)
##return JsonResponse()