Bases: AbstractImage
Custom image class to replace wagtailimages.Image, providing various
additional data fields
drupal_id
class-attribute
instance-attribute
drupal_id = IntegerField(null=True, blank=True, editable=False)
alt
class-attribute
instance-attribute
alt = CharField(max_length=255, blank=True)
credit
class-attribute
instance-attribute
credit = CharField(max_length=255, blank=True)
admin_form_fields = admin_form_fields + ('alt', 'credit')
save
Source code in hypha/images/models.py
| def save(self, *args, **kwargs):
if not self.alt:
self.alt = self.title
super().save(*args, **kwargs)
|