PageRenderTime 81ms CodeModel.GetById 40ms app.highlight 2ms RepoModel.GetById 38ms app.codeStats 0ms

/tests/regressiontests/signals_regress/models.py

https://code.google.com/p/mango-py/
Python | 14 lines | 10 code | 4 blank | 0 comment | 0 complexity | bb1cd5b8e013365209bda282ab74cb2b MD5 | raw file
 1from django.db import models
 2
 3class Author(models.Model):
 4    name = models.CharField(max_length=20)
 5
 6    def __unicode__(self):
 7        return self.name
 8
 9class Book(models.Model):
10    name = models.CharField(max_length=20)
11    authors = models.ManyToManyField(Author)
12
13    def __unicode__(self):
14        return self.name