Skip to content

Instantly share code, notes, and snippets.

@bitprophet
Created November 20, 2009 18:40
Show Gist options
  • Save bitprophet/239680 to your computer and use it in GitHub Desktop.
Save bitprophet/239680 to your computer and use it in GitHub Desktop.
In [20]: list(value for key, value in vars(models).items() if isinstance(value, type) and issubclass(value, Model))
Out[20]:
[<class 'readyroom.catalog.models.Service'>,
<class 'readyroom.catalog.models.System'>,
<class 'readyroom.catalog.models.DriveType'>,
<class 'readyroom.catalog.models.DriveConfig'>,
<class 'readyroom.catalog.models.Worklog'>,
<class 'django.contrib.auth.models.User'>,
<class 'readyroom.catalog.models.Daemon'>,
<class 'readyroom.catalog.models.MemoryType'>,
<class 'readyroom.catalog.models.OSVersion'>,
<class 'readyroom.catalog.models.Process'>,
<class 'readyroom.catalog.models.DriveSet'>,
<class 'readyroom.catalog.models.Computer'>,
<class 'readyroom.catalog.models.MemoryConfig'>,
<class 'readyroom.nagios.models.ServiceCheck'>,
<class 'readyroom.catalog.models.OS'>,
<class 'readyroom.catalog.models.Port'>,
<class 'readyroom.catalog.models.Size'>]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment