Redirecting after saving form on Django
When you save your form you are not redirecting.
Your are returning 'polls/index.html'
with empty polls
data, that's why you always get "No polls are available". But this is very incorrect, you must follow the Post/Redirect/Get (PRG) pattern, so instead of:
return render(request, 'polls/index.html', {})
do this:
return HttpResponseRedirect(reverse('polls:index'))