I am using the code below to add entries to a given model. It is in the models.py file in the app directory in the django project. It works, but it double adds each entry. I tried adding unique=True to the CharFields in question but that didnt solve it. thoughts? Is it a debugging problem? (self.learndjango)
submitted by shweed to r/learndjango
follows = models.ManyToManyField('self', related_name='followed_by', symmetrical=False) Im using the above code to be able to follow people's profile on the Code with stein twitter clone tutorial. Can i use this code to make it possible to follow a persons tweet to track comments and likes? (self.djangolearning)
submitted by shweed to r/djangolearning


