When I'm trying to call my function from my class this error raised. This is my class:
class Tools:
def PrintException(self):
# Do something
return 'ok'
View.py:
from tools import Tools
def err(request):
a = 10
b = 0
msg = ""
try:
print a / b
except Exception,ex:
c = Tools
return HttpResponse(Tools.PrintException())
I've tried to search and have found many articles about this error but I think none of them are my problem!
unbound method must be called with instance as first argument (got nothing instead)
unbound method f() must be called with fibo_ instance as first argument (got classobj instance instead)