def create_a_delivery(self):
     delivery = Delivery()
     delivery.file = self.delivery_filepath
     delivery.student = Student.objects.get(uid=self.student_name)
     course = Course.objects.get(name=self.course_name)
     delivery.practice = Practice.objects.get(course=course, uid=self.practice_uid)
     delivery.deliverDate = self.delivery_date
     delivery.save()
示例#2
0
 def create_a_delivery(self):
     delivery = Delivery()
     delivery.file = self.delivery_filepath
     delivery.student = Student.objects.get(uid=self.student_name)
     course = Course.objects.get(name=self.course_name)
     delivery.practice = Practice.objects.get(course=course,
                                              uid=self.practice_uid)
     delivery.deliverDate = self.delivery_date
     delivery.save()
示例#3
0
文件: utils.py 项目: elcoyaman/seal
def create_a_delivery(delivery_filepath, student_name, course_name, practice_uid, delivery_date):
    delivery = Delivery()
    delivery.file = delivery_filepath
    delivery.student = Student.objects.get(uid=student_name)
    course = Course.objects.get(name=course_name)
    delivery.practice = Practice.objects.get(course=course, uid=practice_uid)
    delivery.deliverDate = delivery_date
    delivery.save()
    return delivery
示例#4
0
def create_a_delivery(delivery_filepath, student_name, course_name,
                      practice_uid, delivery_date):
    delivery = Delivery()
    delivery.file = delivery_filepath
    delivery.student = Student.objects.get(uid=student_name)
    course = Course.objects.get(name=course_name)
    delivery.practice = Practice.objects.get(course=course, uid=practice_uid)
    delivery.deliverDate = delivery_date
    delivery.save()
    return delivery