13 | | {{{ |
14 | | from .models import MainModel |
15 | | for i, field in enumerate(MainModel._meta.get_fields()): |
16 | | fieldname = field.name |
17 | | print i, fieldname |
18 | | print getattr(MainModel, fieldname, None) |
19 | | print getattr(MainModel, fieldname + '_set', None) |
20 | | print |
| 13 | {{{#!python |
| 14 | from .models import MainModel |
| 15 | for i, field in enumerate(MainModel._meta.get_fields()): |
| 16 | fieldname = field.name |
| 17 | print i, fieldname |
| 18 | print getattr(MainModel, fieldname, None) |
| 19 | print getattr(MainModel, fieldname + '_set', None) |
| 20 | print |