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
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()
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