Ian Ward's email:
first name at this domain
wardi on OFTC, freenode and github
If you write any custom Django widgets or admin list_display callable functions you have probably run into this: Everything looks ok, except the place where your widget should be is just blank. Nothing. No traceback or any clue as to what went wrong.
It seems that Django suppresses all the exceptions sent by widgets rendering except for AssertionError and TypeError. Debugging under those conditions is tricky, so I wrote a function decorator to help. Just import this and put @assert_on_exception before your render method or admin list_display callable function:
def assert_on_exception(fn): import sys def wrap(*args, **kwargs): try: return fn(*args, **kwargs) except (AssertionError, TypeError): raise except: raise AssertionError(sys.exc_info().__name__ + ": " + str(sys.exc_info())) wrap.__name__ = fn.__name__ wrap.__dict__.update(fn.__dict__) wrap.__doc__ = fn.__doc__ wrap.__module__ = fn.__module__ return wrap