send error message from view to ajax
class DataInputInsightPage(View):
def post(self,request):
try:
// code
except Exception as ex:
return JsonResponse({'success': False, 'message': 'CSV file not found'}, status=404)
return JsonResponse(context)
Comments
Post a Comment