📜  更改设置项python代码示例

📅  最后修改于: 2022-03-11 14:46:40.393000             🧑  作者: Mango

代码示例1
new_tags = []
for t in tags:
    existing_tag = self.through.tag_model().objects.get(name__iexact=t)
    if existing_tag:
        new_tags.append(existing_tag)
    else:
        new_tags.append(t)
tags = set(new_tags)