Created
January 17, 2012 01:29
-
-
Save fish2000/1623999 to your computer and use it in GitHub Desktop.
Needs moar type system.
This file contains hidden or 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
from django.db.models.loading import cache | |
from apps.mercer import models as mx | |
def print_mf(mf): | |
print "%15s %20s %20s %20s" % (mf.db_column,mf.column,mf.name,mf.attname) | |
for modl in [cache.get_model('mercer', mi) for mi in mx.__dict__.keys()]: | |
if modl is not None and not modl._meta.object_name.lower().startswith('mm'): | |
print "" | |
print " --------- %s ----------" % modl._meta.object_name | |
for mf in modl._meta.fields: | |
print_mf(mf) | |
Author
fish2000
commented
Jan 17, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment