Created
June 25, 2015 16:09
-
-
Save davidthewatson/180c756ede73e35a9025 to your computer and use it in GitHub Desktop.
Get all the view classes for the django sql explorer plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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