Field map for models
It seems like one way or another I always need to get access to a specific field of a Model object. The current way to do this is to iterate through the object's _meta.fields list, comparing with the `name` attribute. Why not just have a lookup of fields? If you paste this code at the bottom of your models.py file it will add a `field_map` attribute to the meta options. For example: `profile = User.objects.get(id=1).get_profile()` `upload_to = profile._meta.field_map['image_icon'].upload_to` ...
- models
- fields
- meta