change redirect after tournament createion #42

Merged
s470631 merged 1 commits from feature/redirect-after-tournament-creation into master 2022-06-05 11:29:29 +02:00

View File

@ -99,7 +99,7 @@ def CreateTournamentView(request, **kwargs):
for k, v in dictt.items(): for k, v in dictt.items():
question_ids.append(k) question_ids.append(k)
Tournament.objects.create(name=name, questions=question_ids, passing_score=passing_score) Tournament.objects.create(name=name, questions=question_ids, passing_score=passing_score)
return render(request, 'home.html') return redirect('home')
context = {} context = {}
context['questions'] = Question.objects.all() context['questions'] = Question.objects.all()
return render(request, 'createTournament.html', context) return render(request, 'createTournament.html', context)