What about:
getattr(foo.__class__, <field_name>)
This should give you a field object, not a value in this instance of the model. If you want the field value in the given model to be like this, you can call it like this:
getattr(foo, <field_name>)
source
share