@login_required(login_url='/admin-panel/login/')
def news(request):
    list = News.objects.all()
    context = {'list': list}
    context['segment'] = 'news'
    html_template = loader.get_template('news.html')
    return HttpResponse(html_template.render(context, request))
@login_required(login_url='/admin-panel/login/')
def news(request):
    list = News.objects.all()
    context = {'list': list}
    context['segment'] = 'news'
    html_template = loader.get_template('news.html')
    return HttpResponse(html_template.render(context, request))