def save(self, **kwargs):
        """Overrides models.Model.save.

        - Delete formatted photos if format save and not now created
          (because of possible changes)
        """

        if self.id:
            for f_photo in self.formatedphoto_set.all():
                f_photo.delete()

        super(Format, self).save(**kwargs)
def save ( self , ** kwargs ) : if self . id : for f_photo in self . formatedphoto_set . all ( ) : f_photo . delete ( ) super ( Format , self ) . save ( ** kwargs )
Overrides models.Model.save.

        - Delete formatted photos if format save and not now created
          (because of possible changes)