本文整理汇总了Python中models.Submission.submitter_name方法的典型用法代码示例。如果您正苦于以下问题:Python Submission.submitter_name方法的具体用法?Python Submission.submitter_name怎么用?Python Submission.submitter_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类models.Submission
的用法示例。
在下文中一共展示了Submission.submitter_name方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: form_valid
# 需要导入模块: from models import Submission [as 别名]
# 或者: from models.Submission import submitter_name [as 别名]
def form_valid(self, form):
# header = "{email} supplied a form!".format(
# email=form.cleaned_data.get('email_address'))
# message = "\n\nType: {0}".format(form.cleaned_data.get('ticket_type').encode('utf-8'))
# message += "\n\nCourt: {0}".format(form.cleaned_data.get('group_court'))
# message += "\n\ncontact_method: {0}".format(form.cleaned_data.get('contact_method'))
# send_mail(
# subject=header,
# message=message,
# from_email='[email protected]',
# recipient_list=['[email protected]'],
# )
c = Submission()
c.software_download = form.cleaned_data.get('software_download')
c.email_address = form.cleaned_data.get('email_address')
c.submitter_name = form.cleaned_data.get('submitter_name')
c.institution = form.cleaned_data.get('institution')
c.save()
return super(ContactFormView, self).form_valid(form)