Пример #1
0
 def create_a_shift(self):
     shift = Shift()
     shift.name = self.shift_name
     shift.description = self.shift_name
     shift.course = Course.objects.get(name=self.course_name)
     shift.save()
     return shift
Пример #2
0
def step(context, name_shift, descrip, course):
    course = Course.objects.get(name=course)
    shift = Shift()
    shift.name = name_shift
    shift.description = descrip
    shift.course = course
    shift.save()
Пример #3
0
def step(context, name_shift, descrip, course):
    course = Course.objects.get(name=course)
    shift = Shift()
    shift.name = name_shift
    shift.description = descrip
    shift.course = course
    shift.save()
Пример #4
0
def create_a_shift(shift_name, course_name):
    shift = Shift()
    shift.name = shift_name
    shift.description = shift_name
    shift.course = Course.objects.get(name=course_name)
    shift.save()
    return shift