fix api documentation for double decorators

This commit is contained in:
j 2013-06-07 11:13:01 +02:00
parent d79a3c0b95
commit 008654ad5d

View file

@ -111,7 +111,7 @@ class ApiActions(dict):
else:
f = self[name]
if name != 'api' and hasattr(f, 'func_closure') and f.func_closure:
f = f.func_closure[0].cell_contents
f = f.func_closure[len(f.func_closure)-1].cell_contents
info = f.func_code.co_filename[len(settings.PROJECT_ROOT)+1:]
info = u'%s:%s' % (info, f.func_code.co_firstlineno)
return info, trim(inspect.getsource(f))