本文整理汇总了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)