Tweaked Election view and added request.user as user

This commit is contained in:
Jean-Baptiste Lenglet authored and klmp200 committed 2016-12-25 19:54:10 +01:00
1 parent a9d154506f
commit fa9e4e5dc6
3 files changed
+26 -13

No files matched your search

+1
View File
@@ -100,6 +100,7 @@ class ElectionDetailView(CanViewMixin, DetailView):
kwargs = super(ElectionDetailView, self).get_context_data(**kwargs)
kwargs['candidate_form'] = CandidateForm(self.get_object().id)
kwargs['election_form'] = VoteForm(self.get_object(), self.request.user)
kwargs['user'] = self.request.user
return kwargs