本文整理汇总了Python中enroll.models.Student.pay_info方法的典型用法代码示例。如果您正苦于以下问题:Python Student.pay_info方法的具体用法?Python Student.pay_info怎么用?Python Student.pay_info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类enroll.models.Student
的用法示例。
在下文中一共展示了Student.pay_info方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: import_student2
# 需要导入模块: from enroll.models import Student [as 别名]
# 或者: from enroll.models.Student import pay_info [as 别名]
def import_student2(course,row):
logging.info('import student2 data=%s'%(row))
try:
s = row[0].lower()
if not (s in ['p','s','d','?']):
logging.info('skip, no p/s/d/? at first col')
return None
except:
logging.info('skip, no p/s/d/? at first col')
return None
st = Student()
st.status = 'e'
st.course_key=str(course.key())
st.init_reg()
st.init_ref_base()
s = row[0].lower()
if s in ['p','s','d']:
st.addressing = s
st.surname = row[2]
st.name = row[1]
try:
st.course_cost = int(row[3])
except:
st.course_cost = 0
try:
st.paid = int(row[4])
except:
st.paid = 0
st.discount = row[5]
st.pay_info = row[6]
st.email = row[7]
st.phone = row[8]
st.street = row[9]
st.street_no = row[10]
st.city = row[11]
st.post_code = row[12]
st.school = row[13]
st.school_class = row[14]
st.comment = row[15]
st.no_email_notification = True
st.no_email_info = not valid_email(st.email)
st.no_email_ad = st.no_email_info
st.student = True
st.student_check = False
st.save()
st.init_ref_codes()
st.save()
return st