Subclassing the Django ImageFileField

后端 未结 2 478
醉梦人生
醉梦人生 2021-02-11 09:36

I\'m interested in subclassing django\'s ImageFileField to allow access to the image IPTC metadata, something like:

>>> from myapp.models import SomeMod         


        
2条回答
  •  清歌不尽
    2021-02-11 10:16

    UPDATE: I have figured this one out -- thanks in part to the answer @valya provided. An example of a successful implementation can be found in my fork of django-imagekit:

    https://github.com/fish2000/django-imagekit/blob/icc-develop/imagekit/modelfields.py

提交回复
热议问题