@login_required(login_url='/admin-panel/login/')
def delete_news(request, news_id):
    news_id = int(news_id)
    try:
        news_sel = News.objects.get(pk=news_id)
    except news_id.DoesNotExist:
        return redirect('/admin-panel/news')
    news_sel.delete()
    return redirect('/admin-panel/news')
@login_required(login_url='/admin-panel/login/')
def delete_news(request, news_id):
    news_id = int(news_id)
    try:
        news_sel = News.objects.get(pk=news_id)
    except news_id.DoesNotExist:
        return redirect('/admin-panel/news')
    news_sel.delete()
    return redirect('/admin-panel/news')