models.py 204 B

12345678910
  1. from django.db import models
  2. class Comment(models.Model):
  3. pass
  4. class Book(models.Model):
  5. title = models.CharField(max_length=100, db_index=True)
  6. comments = models.ManyToManyField(Comment)