本文整理汇总了Python中event.models.Event.email方法的典型用法代码示例。如果您正苦于以下问题:Python Event.email方法的具体用法?Python Event.email怎么用?Python Event.email使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类event.models.Event
的用法示例。
在下文中一共展示了Event.email方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: addevent
# 需要导入模块: from event.models import Event [as 别名]
# 或者: from event.models.Event import email [as 别名]
def addevent(request):
if request.method == 'POST':
eventform = EventForm(request.POST)
if eventform.is_valid():
event = Event()
event.event = eventform.cleaned_data['event']
event.startdate = eventform.cleaned_data['startdate']
event.enddate = eventform.cleaned_data['enddate']
event.organizer = eventform.cleaned_data['organizer']
event.description = eventform.cleaned_data['description']
event.email = eventform.cleaned_data['email']
event.website = eventform.cleaned_data['website']
event.affiche = eventform.cleaned_data['affiche']
event.save()
return HttpResponseRedirect('agenda')
else:
eventform = EventForm()
return render(request, 'event/addevent.html', locals())