Ejemplo n.º 1
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()
Ejemplo n.º 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()
Ejemplo n.º 3
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
Ejemplo n.º 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