I’m using django-taggit to tag my to do records.
class Action(models.Model):
name = models.CharField("Action Name", max_length=200)
complete = models.BooleanField(default=False, verbose_name="Complete?")
tags = TaggableManager()
I’m trying to make an exact copy of a records, down to the tags that are associated with the task.
new_obj = deepcopy(self)
new_obj.id = None
new_obj.save()
After running this code, the copy is exact except that there are no affiliated tags. How can I copy all of the tags from “self” to new_obj?
Instead of adding the tags to the object:
I added the new object to the Tag: