blob: d8f372b403515fc964bd651fbc14d841d7caee95 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Comment(models.Model):
pass
@python_2_unicode_compatible
class Book(models.Model):
title = models.CharField(max_length=100, db_index=True)
comments = models.ManyToManyField(Comment)
|