本文整理匯總了Python中enroll.models.Student.get方法的典型用法代碼示例。如果您正苦於以下問題:Python Student.get方法的具體用法?Python Student.get怎麽用?Python Student.get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類enroll.models.Student
的用法示例。
在下文中一共展示了Student.get方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: update_all_students_do_one
# 需要導入模塊: from enroll.models import Student [as 別名]
# 或者: from enroll.models.Student import get [as 別名]
def update_all_students_do_one(request):
logging.info("update_all_students_do_one")
logging.info(request.POST)
student_key = request.POST["student_key"]
s = Student.get(student_key)
if s is None:
raise Http404
logging.info("update student %s"%s)
cdbsync.plan_cdb_put(s)
return HttpResponse('ok')
示例2: txn
# 需要導入模塊: from enroll.models import Student [as 別名]
# 或者: from enroll.models.Student import get [as 別名]
def txn():
student = Student.get(student_key)
inv = StudentInvCard()
inv.init(student,"sys",u"špatně vygenerovaná karta (duplicitní)")
inv.ref_gid_in_pool = True
inv.save()
student.ref_gid = gid_pool.ret_and_create_new_git_item("students",student.ref_gid,str(student.key()))
#gid_pool.ret_existing_gid_item("students",student.ref_gid,str(student.key()))
#tudent.ref_gid=gid_pool.create_new_gid_item("students",str(student.key()))
student.save()
return (inv,student)