Пример #1
0
 def create_a_practice(self):
     practice = Practice()
     practice.course = Course.objects.get(name=self.course_name)
     practice.deadline = self.practice_deadline
     practice.file = self.practice_filepath
     practice.uid = self.practice_uid
     practice.save()
Пример #2
0
 def create_a_practice(self):
     practice = Practice()
     practice.course = Course.objects.get(name=self.course_name)
     practice.deadline = self.practice_deadline
     practice.file = self.practice_filepath
     practice.uid = self.practice_uid
     practice.save()
Пример #3
0
def create_a_practice(course_name, practice_deadline, practice_filepath, practice_uid):
    practice = Practice()
    practice.course = Course.objects.get(name=course_name)
    practice.deadline = practice_deadline
    practice.file = practice_filepath
    practice.uid = practice_uid
    practice.save()
    return practice
Пример #4
0
def create_a_practice(course_name, practice_deadline, practice_filepath,
                      practice_uid):
    practice = Practice()
    practice.course = Course.objects.get(name=course_name)
    practice.deadline = practice_deadline
    practice.file = practice_filepath
    practice.uid = practice_uid
    practice.save()
    return practice