. Advertisement .
..3..
. Advertisement .
..4..
I get a ”typeerror: super(type, obj): obj must be an instance or subtype of type” error when rendering a view which has been reloaded with following code:
def __call__(self):
# Implement your own actions:
return super(SomeView, self).__call__()```
Why do I get the following error, and how do I resolve it?
The cause: This error occurs because
super
cannot called be with an unrelated class/type.Solution: You should call
super
using theUrlManager
class as first argument not theURL
model.So you cannot do:
You need to do:
Or in Python 3: