This commit is contained in:
Anna Sudnitsina 2017-09-01 17:55:39 +03:00
parent c091bc7ee2
commit 9155ec7236

View File

@ -3,6 +3,7 @@ from __future__ import unicode_literals
from django.http import JsonResponse from django.http import JsonResponse
from django.shortcuts import render from django.shortcuts import render
from django.contrib.auth.decorators import login_required
import json import json
import requests import requests
@ -47,6 +48,7 @@ def resolve(request):
print 'res' + res print 'res' + res
return JsonResponse(res, safe=False) return JsonResponse(res, safe=False)
@login_required(login_url="/admin/login/?next=/")
def panel(request): def panel(request):
with open('conf.json') as conf: with open('conf.json') as conf:
ws = json.load(conf)["ws"] ws = json.load(conf)["ws"]