django.db.models ImageField Python Code Examples

ImageField (documentation) is a Django ORM field-to-column mapping for storing image files in a Django application. This field is a subclass of FileField so it has all of the attributes of that class, as well as a couple of new optional attributes, height_field and width_field, to make it easier to query the stored image data.

ImageField is defined within the django.db.models.fields module but is typically referenced from django.db.models rather than including the fields module reference.

Example 1 from dccnsys

dccnsys is a conference registration system built with Django. The code is open source under the MIT license.

dccnsys / wwwdccn / users / models.py

Example 2 from wagtail

wagtail (project website) is a fantastic Django-based CMS with code that is open source under the BSD 3-Clause "New" or "Revised" License.

wagtail / wagtail / images / models.py