CopyPastor

Detecting plagiarism made easy.

Score: 1.991137353538238; Reported for: String similarity, Exact paragraph match Open both answers

Possible Plagiarism

Reposted on 2021-04-06
by Ratnesh Varma

Original Post

Original - Posted on 2021-04-06
by Ratnesh Varma



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

class Employee(models.Model): name = models.CharField(max_length=100) def save(self, *args, **kwargs): super(Employee, self).save(*args, **kwargs) self.name = str(self.name.encode('unicode_escape')) self.save()
you need to encode with unicode_escape before saving as mention in above example self.name = str(self.name.encode('unicode_escape')) to accept any char
class Employee(models.Model): name = models.CharField(max_length=100) def save(self, *args, **kwargs): super(Employee, self).save(*args, **kwargs) self.name = str(self.name.encode('unicode_escape')) self.save()
you need to encode with unicode_escape before saving as mention in above example (self.name = str(self.name.encode('unicode_escape'))), no need to do any other setting or db changes


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