parts/django/tests/regressiontests/signals_regress/models.py
author Nishanth Amuluru <nishanth@fossee.in>
Sun, 09 Jan 2011 00:53:11 +0530
changeset 348 1eb24b1662cf
parent 307 c6bca38c1cbf
permissions -rw-r--r--
commenting does not need a verbose_name

from django.db import models

class Author(models.Model):
    name = models.CharField(max_length=20)

    def __unicode__(self):
        return self.name

class Book(models.Model):
    name = models.CharField(max_length=20)
    authors = models.ManyToManyField(Author)

    def __unicode__(self):
        return self.name