# coding: utf-8

from django.http.response import JsonResponse, HttpResponse


def json_response(func):
    def wrapped(request, *args, **kwargs):
        response = func(request, *args, **kwargs)
        if isinstance(response, HttpResponse):
            return response
        return JsonResponse(response)
    return wrapped

af352573836d82c84183d03f206adb0cbce32087
<mask token>

<mask token>


def json_response(func):

    def wrapped(request, *args, **kwargs):
        response = func(request, *args, **kwargs)
        if isinstance(response, HttpResponse):
            return response
        return JsonResponse(response)
    return wrapped

from django.http.response import JsonResponse, HttpResponse


def json_response(func):

    def wrapped(request, *args, **kwargs):
        response = func(request, *args, **kwargs)
        if isinstance(response, HttpResponse):
            return response
        return JsonResponse(response)
    return wrapped

# coding: utf-8

from django.http.response import JsonResponse, HttpResponse


def json_response(func):
    def wrapped(request, *args, **kwargs):
        response = func(request, *args, **kwargs)
        if isinstance(response, HttpResponse):
            return response
        return JsonResponse(response)
    return wrapped
