From ce33c1b423c2e9eeaedab595b4e1286944e4dc40 Mon Sep 17 00:00:00 2001 From: www-data Date: Tue, 5 Jun 2018 11:03:11 +0300 Subject: [PATCH] fix --- taskapp/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/taskapp/views.py b/taskapp/views.py index 2e53022..83bd8d3 100644 --- a/taskapp/views.py +++ b/taskapp/views.py @@ -1,6 +1,5 @@ from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied -from django.http import HttpResponse from django.db.models import Count from django.shortcuts import redirect, get_object_or_404, resolve_url from django.contrib import messages @@ -265,7 +264,7 @@ def check_news(request): r = {'auth': True, 'exist': False} else: r = {'auth': False} - return HttpResponse(dumps(r)) + return r @method_decorator((login_required, only_admins), name='dispatch')