2👍
✅
That’s just very simple. Use _meta
for this purpose. You can use get_field method to get the fields of the model like imageA
in your case. Then access any attribute of that field using object notations.
upload_to_attr = ModelName._meta.get_field('foo').upload_to
more generic:
attr_value = ModelName._meta.get_field('foo').attr_name
Source:stackexchange.com