代替
return HttpResponseRedirect('news:home',request)
这个:
return HttpResponseRedirect(reverse('news:home'))
要么
return redirect('news:home')
return redirect(reverse('news:home'))