include filename
This commit is contained in:
parent
457c9b867a
commit
7686f7974f
2 changed files with 5 additions and 3 deletions
|
|
@ -99,7 +99,8 @@ class ApiActions(dict):
|
|||
f = self[name]
|
||||
if name != 'api' and hasattr(f, 'func_closure') and f.func_closure:
|
||||
f = f.func_closure[0].cell_contents
|
||||
return trim(inspect.getsource(f))
|
||||
filename = f.func_code.co_filename[len(settings.PROJECT_ROOT)+1:]
|
||||
return filename, trim(inspect.getsource(f))
|
||||
|
||||
def register(self, method, action=None, cache=True):
|
||||
if not action:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue