users/models.py
def save(self,*args,**kwargs):
        '''
        overriding the save method inorder to resize the profile images
        '''

        super(Profile,self).save(*args,**kwargs)
        img=Image.open(self.image)

        if img.height>300 or img.width>300:
            output_size=(300,300)
            img.thumbnail(output_size)
            img.save(self.image.path)

        overriding the save method inorder to resize the profile images
        
overriding the save method inorder to resize the profile images
overriding the save method inorder to resize the profile images
def save(self,*args,**kwargs):
        super(Profile,self).save(*args,**kwargs)
        img=Image.open(self.image)
        if img.height>300 or img.width>300:
            output_size=(300,300)
            img.thumbnail(output_size)
            img.save(self.image.path)
def save ( self , * args , ** kwargs ) : super ( Profile , self ) . save ( * args , ** kwargs ) img = Image . open ( self . image ) if img . height > 300 or img . width > 300 : output_size = ( 300 , 300 ) img . thumbnail ( output_size ) img . save ( self . image . path )
overriding the save method inorder to resize the profile images
overriding the save method inorder to resize the profile images
'''
        overriding the save method inorder to resize the profile images
        '''
self