本文整理汇总了Python中app.models.Event.add_tag方法的典型用法代码示例。如果您正苦于以下问题:Python Event.add_tag方法的具体用法?Python Event.add_tag怎么用?Python Event.add_tag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app.models.Event
的用法示例。
在下文中一共展示了Event.add_tag方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Event
# 需要导入模块: from app.models import Event [as 别名]
# 或者: from app.models.Event import add_tag [as 别名]
address=PostalAddress(u"Korsvägen Göteborg"),
)
svenska_massan.save()
ncpc = Event(
name = u"Nordic Collegiate Programming Challenge (NCPC)",
description = "Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. " \
"Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.",
date = date(now.year,now.month,now.day),
time = time(now.hour, now.minute),
venue = chalmers,
website = Link("http://ncpc.example.com"),
contact_email = Email("[email protected]"),
contact_phone = PhoneNumber("46 (31) 111222333"),
)
ncpc.add_tag("java")
ncpc.add_tag("smalltalk")
ncpc.add_tag("python")
ncpc.save()
nordic_python = Event(
name = u"Nordic Python Conference",
description = "Lorem ipsum dolor sit amet",
date = date(just_before.year,just_before.month,just_before.day),
time = time(just_before.hour, just_before.minute),
venue = kth,
website = None,
contact_email = None,
contact_phone = None,
)
nordic_python.add_tag("python")