code: def previous(self):
          ''' Returns previous image for same content_object and None if image
          is the first. '''
          try:
              return self.__class__.objects.for_model(self.content_object,
                                                      self.content_type).\
                              filter(order__gt=self.order).order_by('order')[0]
          except IndexError:
              return Nonf previous(self):
          ''' Returns previous image for same content_object and None if image
          is the first. '''
          try:
              return self.__class__.objects.for_model(self.content_object,
                                                      self.content_type).\
                              filter(order__gt=self.order).order_by('order')[0]
          except IndexError:
              return None
docs: Returns previous image for same content_object and None if image
          is the first.