from django.http import JsonResponse from django.views import View class BaseView(View): def _error_response(self, error_msg: str) -> JsonResponse: return JsonResponse( { "error": error_msg, "status": -100, "total": 0, "items": [], }, )