~ubuntu-branches/debian/sid/python-django/sid

« back to all changes in this revision

Viewing changes to tests/signals/models.py

  • Committer: Package Import Robot
  • Author(s): Raphaël Hertzog
  • Date: 2014-09-17 14:15:11 UTC
  • mfrom: (1.3.17) (6.2.18 experimental)
  • Revision ID: package-import@ubuntu.com-20140917141511-icneokthe9ww5sk4
Tags: 1.7-2
* Release to unstable.
* Add a migrate-south sample script to help users apply their South
  migrations. Thanks to Brian May.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
    def __str__(self):
16
16
        return "%s %s" % (self.first_name, self.last_name)
17
17
 
 
18
 
18
19
@python_2_unicode_compatible
19
20
class Car(models.Model):
20
21
    make = models.CharField(max_length=20)
22
23
 
23
24
    def __str__(self):
24
25
        return "%s %s" % (self.make, self.model)
 
26
 
 
27
 
 
28
@python_2_unicode_compatible
 
29
class Author(models.Model):
 
30
    name = models.CharField(max_length=20)
 
31
 
 
32
    def __str__(self):
 
33
        return self.name
 
34
 
 
35
 
 
36
@python_2_unicode_compatible
 
37
class Book(models.Model):
 
38
    name = models.CharField(max_length=20)
 
39
    authors = models.ManyToManyField(Author)
 
40
 
 
41
    def __str__(self):
 
42
        return self.name