diff options
| author | Jannis Leidel | 2012-05-13 12:51:55 +0200 |
|---|---|---|
| committer | Jannis Leidel | 2012-05-13 12:51:55 +0200 |
| commit | 676eebd9600eb938804b652ce572a30e3ee6626e (patch) | |
| tree | bdc011b9dfce6827b99261d6352f9a36990ef9a2 /debug_toolbar | |
| parent | d069759f014cc5605a448be67782ff9a00836037 (diff) | |
| download | django-debug-toolbar-676eebd9600eb938804b652ce572a30e3ee6626e.tar.bz2 | |
Added support for class methods.
Diffstat (limited to 'debug_toolbar')
| -rw-r--r-- | debug_toolbar/utils/tracking/__init__.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/debug_toolbar/utils/tracking/__init__.py b/debug_toolbar/utils/tracking/__init__.py index 6d4b0e3..766c248 100644 --- a/debug_toolbar/utils/tracking/__init__.py +++ b/debug_toolbar/utils/tracking/__init__.py @@ -51,8 +51,7 @@ def _replace_function(func, wrapped): module = import_module(func.__module__) setattr(module, func.__name__, wrapped) elif getattr(func, 'im_self', None): - # TODO: classmethods - raise NotImplementedError + setattr(func.im_self, func.__name__, classmethod(wrapped)) elif hasattr(func, 'im_class'): # for unbound methods setattr(func.im_class, func.__name__, wrapped) |
