def log_js_error(request): ai = AccessInfo(request) ai.log(level=logging.ERROR, msg='JS ERROR: ' + request.POST.get('jserror', 'Unspecified JS error')) return JsonResponse({'status': 0})
def log_analytics(request): ai = AccessInfo(request) ai.log(level=logging.INFO, msg='PAGE: ' + request.POST.get('page')) return JsonResponse({'status': 0})