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