PageRenderTime 46ms CodeModel.GetById 26ms app.highlight 6ms RepoModel.GetById 4ms 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
Possible License(s): BSD-3-Clause
 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