Example #1
0
def saveFile(request):
    if request.method == 'POST':
        api = Api.SaveFile(request.FILES)
        return JsonResponse(api, status=api['status'])
    print(request.body)
    api = Api.SaveFile(request.FILES)
    return JsonResponse(api, status=api['status'])
Example #2
0
def prototype(request):
    if request.method == 'GET':
        if request.GET.get("filter"):
            api = Api.getPrototypes(isShow=True)
        else:
            api = Api.getPrototypes()
        return JsonResponse(api, status=api['status'])
    elif request.method == 'POST':
        api = Api.createPrototype(request.FILES, request.body)
        return JsonResponse(api, status=api['status'])
    else:
        raise Http404
Example #3
0
def analytics_count_taps(request, id):
    api = Api.analytics(id, title="Количество тапов", value=1)
    return JsonResponse(api, status=api['status'])
Example #4
0
def analytics_screen(request, id):
    api = Api.analytics(id, title="Посещенных экраннов", value=1)
    return JsonResponse(api, status=api['status'])
Example #5
0
def analytics(request, id):
    api = Api.getAnalytics(id)
    return JsonResponse(api, status=api['status'])
Example #6
0
def clearApplication(request):
    print(request.method)
    if request.method == 'POST':
        api = Api().clear()
        return JsonResponse(api, status=api['status'])
Example #7
0
def getApplication(request, id):
    url = request.get_raw_uri()
    url = url.replace(":{0}{1}".format(request.get_port(), request.path), "")
    api = Api.getApp(url, id)
    return JsonResponse(api, status=api['status'])
Example #8
0
def detailsPrototype(request, id):
    api = Api().getPrototype(id)
    return JsonResponse(api, status=api['status'])