本文整理汇总了Python中taggit.managers.TaggableManager.add方法的典型用法代码示例。如果您正苦于以下问题:Python TaggableManager.add方法的具体用法?Python TaggableManager.add怎么用?Python TaggableManager.add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类taggit.managers.TaggableManager
的用法示例。
在下文中一共展示了TaggableManager.add方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create_user
# 需要导入模块: from taggit.managers import TaggableManager [as 别名]
# 或者: from taggit.managers.TaggableManager import add [as 别名]
user = User.objects.get(username=row__):
except: #User not Found
create_user()
print "No user with those names"
nationality = row__
current_location = row__
work = row__
startup_status = row__
portfolio_status = row__
itc_program_name = row__
itc_program_year = row__
linked_in_url = row__
skills = TaggableManager()
skills.add(row__)
profile_tuple = (user=user,
nationality=nationality,
current_location,
current_location=current_location,
work=work,
startup_status=startup_status,
portfolio_status=portfolio_status,
itc_program_name=itc_program_name,
itc_program_year=itc_program_year)
UserProfile.objects.create(profile_tuple)
return
if __name__ == "__main__":