From 703bf89cb250e95dcb11649d1d923a52cc315aa8 Mon Sep 17 00:00:00 2001 From: Sergio Oliveira Date: Thu, 24 Oct 2013 10:54:24 -0200 Subject: [PATCH] Trying to call super to avoid overding the method --- src/hitcount/views.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/hitcount/views.py b/src/hitcount/views.py index c6fefaa..afba530 100644 --- a/src/hitcount/views.py +++ b/src/hitcount/views.py @@ -1,8 +1,11 @@ from django.shortcuts import render class HitCountViewMixin(object): - def get_object(self): - raise NotImplementedError + def get_object(self, *args, **kwargs): + try: + super(HitCountViewMixin, self).get_object(*args, **kwargs) + except AttributeError: + raise NotImplementedError def dispatch(self, request, *args, **kwargs): response = super(HitCountViewMixin, self).dispatch(request, -- libgit2 0.21.2