2013-02-09 23:30:33 +08:00
|
|
|
from django.db import models
|
|
|
|
from django.utils.encoding import python_2_unicode_compatible
|
|
|
|
|
|
|
|
|
2013-05-29 21:47:21 +08:00
|
|
|
@python_2_unicode_compatible
|
|
|
|
class Comment(models.Model):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2013-02-09 23:30:33 +08:00
|
|
|
@python_2_unicode_compatible
|
|
|
|
class Book(models.Model):
|
|
|
|
title = models.CharField(max_length=100, db_index=True)
|
2013-05-29 21:47:21 +08:00
|
|
|
comments = models.ManyToManyField(Comment)
|