Я хочу передать эту ошибку в шаблон, но она не работает,
def addcomment(request):
name = request.POST['name']
comment = request.POST['comment']
if name=="" and comment=="":
my_dict = {'error':'blank fields not allowed'}
return redirect('home',my_dict)
Comment(name = request.POST['name'],comment = request.POST['comment']).save()
return HttpResponseRedirect('/')