CopyPastor

Detecting plagiarism made easy.

Score: 0.8972712339119431; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2021-11-22
by BiswajitPaloi

Original Post

Original - Posted on 2018-09-16
by ar-m-an



            
Present in both answers; Present only in the new answer; Present only in the old answer;

When you are overriding model's save method in Django, you should also pass *args and **kwargs to overridden method. this code may work fine:

def save(self, *args, **kwargs): super(Profile, self).save(*args, **kwargs) img = Image.open(self.image.path) if img.height > 300 or img.width > 300: output_size = (300,300) img.thumbnail(output_size) img.save(self.image.path)'
When you are overriding model's save method in Django, you should also pass `*args` and `**kwargs` to overridden method. this code may work fine:
def save(self, *args, **kwargs): super(Profile, self).save(*args, **kwargs)
img = Image.open(self.image.path)
if img.height > 300 or img.width > 300: output_size = (300,300) img.thumbnail(output_size) img.save(self.image.path)'

        
Present in both answers; Present only in the new answer; Present only in the old answer;