Skip to content

Instantly share code, notes, and snippets.

@davidthewatson
Created June 25, 2015 16:09
Show Gist options
  • Save davidthewatson/180c756ede73e35a9025 to your computer and use it in GitHub Desktop.
Save davidthewatson/180c756ede73e35a9025 to your computer and use it in GitHub Desktop.
Get all the view classes for the django sql explorer plugin
import inspect
import types
import explorer.views
for name, fn in inspect.getmembers(explorer.views):
if name[-4:] == 'View':
print name
if isinstance(fn, types.UnboundMethodType):
#setattr(Something, name, decorator(fn))
print fn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment