method_decorator login_required event_log event_type metric_events BM_

1
2
3
4
5
6
7
8
@method_decorator(login_required)
@event_log(event_type=metric_events.BM_HISTORY_OPEN)
def dispatch(self, request, *args, **kwargs):
return super(BenchmarkHistoryView, self).dispatch(request, *args, **kwargs)
def get_queryset(self):
return Benchmark.valid.filter(Q(owner=self.request.user) |
Q(question__responses__user=self.request.user))