Commit 703bf89cb250e95dcb11649d1d923a52cc315aa8

Authored by Sergio Oliveira
1 parent 92082996

Trying to call super to avoid overding the method

Showing 1 changed file with 5 additions and 2 deletions   Show diff stats
src/hitcount/views.py
1 1 from django.shortcuts import render
2 2  
3 3 class HitCountViewMixin(object):
4   - def get_object(self):
5   - raise NotImplementedError
  4 + def get_object(self, *args, **kwargs):
  5 + try:
  6 + super(HitCountViewMixin, self).get_object(*args, **kwargs)
  7 + except AttributeError:
  8 + raise NotImplementedError
6 9  
7 10 def dispatch(self, request, *args, **kwargs):
8 11 response = super(HitCountViewMixin, self).dispatch(request,
... ...