I am trying somehow to "register" a method inside a class ( @classmethod ) using a decorator to be able to call it later.
So far, I have been trying in my decorator to get the full namespace without any results.
I can only get __module__ , but I canβt get the name of the class this method is in (because I register it during __init__ , and not during __call__ inside my custom decorator).
Is there any way to achieve this?
I think the only way to inspect whole file is to somehow check if the method exists inside each of the classes, so inspect decisions are also made
Additional Information
Basically, I'm trying to develop django-dajaxice and change this decorator to be able to register full path functions (consisting of classname) to call, for example, my.namespace.views.MyView.as_view(...) from AJAX (I know that it is more difficult, I try to simplify)
source share