- # Only show this player's influences
- os = Influence.objects.filter(character__player=request.user)
- return render_to_response('influences/influence_list.html', {'object_list' : os}, RequestContext(request))
+ # Only show the influences related to this player's characters
+ characters = request.user.character_set.all()
+ return render_to_response('influences/influence_list.html', {'characters' : characters}, RequestContext(request))
+
+def influence_comment_preview(request, context_processors, extra_context, **kwargs):
+ # Use a custom template
+ kwargs['template'] = 'influences/influence_comment_preview.html'
+ # The object to be show in the influence detail
+ extra_context['object'] = get_object_or_404(Influence, pk=kwargs['object_id'])
+ return _preview(request, context_processors, extra_context, **kwargs)