本文整理匯總了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