Example #1
0
	def get_context_data (self, **kwargs):
		context = super(GameMixin, self).get_context_data(**kwargs)
		context['game'] = self.game
		context['player'] = get_object_or_none(Player,
			game__slug=self.game.slug, user=self.request.user)
		return context
Example #2
0
	def get_context_data (self, **kwargs):
		context = super(GameDetail, self).get_context_data(**kwargs)
		context['player'] = get_object_or_none(Player, game=self.object, user=self.request.user)
		return context