Initial commit

This commit is contained in:
2022-09-15 22:25:55 +03:00
commit 7582330b1b
70 changed files with 1094 additions and 0 deletions

12
api/views.py Normal file
View File

@@ -0,0 +1,12 @@
import json
from django.http import HttpResponse
def call_method(request, method_name):
tmp = {}
for key in request.GET:
tmp[key] = request.GET[key]
response = HttpResponse(json.dumps({"response": {"method": method_name, "params": tmp}}, ensure_ascii=True))
response.headers["Content-type"] = "application/json"
return response