parts/django/tests/regressiontests/signals_regress/models.py
author Nishanth Amuluru <nishanth@fossee.in>
Tue, 11 Jan 2011 14:30:25 +0530
changeset 142 e848bd3ad41f
parent 69 c6bca38c1cbf
permissions -rw-r--r--
approval of textbooks works now

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