peewee Documentation Release 2.10.2remove(Course.select().where(Course.name.startswith('CS')) ) engl_101.students.remove(huey) # Calling .clear() will remove all associated objects: cs_150.students.clear() For more examples, see: ManyToManyField = Student.get(Student.name == 'huey') >>> [course.name for course in huey.courses] ['English 101', 'CS 101'] >>> engl_101 = Course.get(Course.name == 'English 101') >>> [student.name for student in engl_101 English 151 English 201 English 221 >>> cs_101 = Course.get(Course.name == 'CS 101') >>> cs_151 = Course.get(Course.name == 'CS 151') >>> huey.courses.add([cs_101, cs_151]) >>> [course.name for course in0 码力 | 275 页 | 276.96 KB | 1 年前3
peewee Documentation
Release 2.10.2remove(Course.select().where(Course.name.startswith('CS'))) engl_101.students.remove(huey) # Calling .clear() will remove all associated objects: cs_150.students.clear() For more examples, see: • ManyToManyField = Student.get(Student.name == 'huey') >>> [course.name for course in huey.courses] ['English 101', 'CS 101'] >>> engl_101 = Course.get(Course.name == 'English 101') >>> [student.name for student in engl_101 English 151 English 201 English 221 >>> cs_101 = Course.get(Course.name == 'CS 101') >>> cs_151 = Course.get(Course.name == 'CS 151') >>> huey.courses.add([cs_101, cs_151]) >>> [course.name for course in0 码力 | 221 页 | 844.06 KB | 1 年前3
peewee Documentation Release 3.0.0remove(Course.select().where(Course.name.startswith('CS')) ) engl_101.students.remove(huey) # Calling .clear() will remove all associated objects: cs_150.students.clear() For more examples, see: ManyToManyField = Student.get(Student.name == 'huey') >>> [course.name for course in huey.courses] ['English 101', 'CS 101'] >>> engl_101 = Course.get(Course.name == 'English 101') >>> [student.name for student in engl_101 English 151 English 201 English 221 >>> cs_101 = Course.get(Course.name == 'CS 101') >>> cs_151 = Course.get(Course.name == 'CS 151') >>> huey.courses.add([cs_101, cs_151]) >>> [course.name for course in0 码力 | 319 页 | 361.50 KB | 1 年前3
peewee Documentation
Release 3.5.0remove(Course.select().where(Course.name.startswith('CS')) ) engl_101.students.remove(huey) # Calling .clear() will remove all associated objects: cs_150.students.clear() For more examples, see: ManyToManyField = Student.get(Student.name == 'huey') >>> [course.name for course in huey.courses] ['English 101', 'CS 101'] >>> engl_101 = Course.get(Course.name == 'English 101') >>> [student.name for student in engl_101 English 151 English 201 English 221 >>> cs_101 = Course.get(Course.name == 'CS 101') >>> cs_151 = Course.get(Course.name == 'CS 151') >>> huey.courses.add([cs_101, cs_151]) >>> [course.name for course in0 码力 | 347 页 | 380.80 KB | 1 年前3
peewee Documentation Release 3.4.0remove(Course.select().where(Course.name.startswith('CS')) ) engl_101.students.remove(huey) # Calling .clear() will remove all associated objects: cs_150.students.clear() For more examples, see: ManyToManyField = Student.get(Student.name == 'huey') >>> [course.name for course in huey.courses] ['English 101', 'CS 101'] >>> engl_101 = Course.get(Course.name == 'English 101') >>> [student.name for student in engl_101 Parameters: English 201 English 221 >>> cs_101 = Course.get(Course.name == 'CS 101') >>> cs_151 = Course.get(Course.name == 'CS 151') >>> huey.courses.add([cs_101, cs_151]) >>> [course.name for course in0 码力 | 349 页 | 382.34 KB | 1 年前3
peewee Documentation Release 3.1.0remove(Course.select().where(Course.name.startswith('CS')) ) engl_101.students.remove(huey) # Calling .clear() will remove all associated objects: cs_150.students.clear() For more examples, see: ManyToManyField = Student.get(Student.name == 'huey') >>> [course.name for course in huey.courses] ['English 101', 'CS 101'] >>> engl_101 = Course.get(Course.name == 'English 101') >>> [student.name for student in engl_101 English 151 English 201 English 221 >>> cs_101 = Course.get(Course.name == 'CS 101') >>> cs_151 = Course.get(Course.name == 'CS 151') >>> huey.courses.add([cs_101, cs_151]) >>> [course.name for course in0 码力 | 332 页 | 370.77 KB | 1 年前3
peewee Documentation
Release 3.5.0remove(Course.select().where(Course.name.startswith('CS'))) engl_101.students.remove(huey) # Calling .clear() will remove all associated objects: cs_150.students.clear() For more examples, see: • ManyToManyField = Student.get(Student.name == 'huey') >>> [course.name for course in huey.courses] ['English 101', 'CS 101'] >>> engl_101 = Course.get(Course.name == 'English 101') >>> [student.name for student in engl_101 English 151 English 201 English 221 >>> cs_101 = Course.get(Course.name == 'CS 101') >>> cs_151 = Course.get(Course.name == 'CS 151') >>> huey.courses.add([cs_101, cs_151]) >>> [course.name for course in0 码力 | 282 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.3.0remove(Course.select().where(Course.name.startswith('CS'))) engl_101.students.remove(huey) # Calling .clear() will remove all associated objects: cs_150.students.clear() For more examples, see: • ManyToManyField = Student.get(Student.name == 'huey') >>> [course.name for course in huey.courses] ['English 101', 'CS 101'] >>> engl_101 = Course.get(Course.name == 'English 101') >>> [student.name for student in engl_101 previous page) English 201 English 221 >>> cs_101 = Course.get(Course.name == 'CS 101') >>> cs_151 = Course.get(Course.name == 'CS 151') >>> huey.courses.add([cs_101, cs_151]) >>> [course.name for course in0 码力 | 280 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.4.0remove(Course.select().where(Course.name.startswith('CS'))) engl_101.students.remove(huey) # Calling .clear() will remove all associated objects: cs_150.students.clear() For more examples, see: • ManyToManyField = Student.get(Student.name == 'huey') >>> [course.name for course in huey.courses] ['English 101', 'CS 101'] >>> engl_101 = Course.get(Course.name == 'English 101') >>> [student.name for student in engl_101 English 151 English 201 English 221 >>> cs_101 = Course.get(Course.name == 'CS 101') >>> cs_151 = Course.get(Course.name == 'CS 151') >>> huey.courses.add([cs_101, cs_151]) >>> [course.name for course in0 码力 | 284 页 | 1.03 MB | 1 年前3
peewee Documentation Release 3.6.0remove(Course.select().where(Course.name.startswith('CS')) ) engl_101.students.remove(huey) # Calling .clear() will remove all associated objects: cs_150.students.clear() Attention Before many-to-many = Student.get(Student.name == 'huey') >>> [course.name for course in huey.courses] ['English 101', 'CS 101'] >>> engl_101 = Course.get(Course.name == 'English 101') >>> [student.name for student in engl_101 English 151 English 201 English 221 >>> cs_101 = Course.get(Course.name == 'CS 101') >>> cs_151 = Course.get(Course.name == 'CS 151') >>> huey.courses.add([cs_101, cs_151]) >>> [course.name for course in0 码力 | 377 页 | 399.12 KB | 1 年前3
共 11 条
- 1
- 2













