4👍
django-taggit does exactly what you want, but in your case sampletag
!= Sample_tag
, so another Tag
instance is created.
>>> i.tags.all()
[]
>>> i.tags.add("test")
>>> i.tags.all()
[<Tag: test>]
>>> i.tags.add("test")
>>> i.tags.all()
[<Tag: test>]
>>>
Source:stackexchange.com