PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/tests/modeltests/signals/models.py

https://code.google.com/p/mango-py/
Python | 20 lines | 11 code | 6 blank | 3 comment | 0 complexity | e41e8b0c3275dd8774b93a0813f920fa MD5 | raw file
 1"""
 2Testing signals before/after saving and deleting.
 3"""
 4
 5from django.db import models
 6
 7
 8class Person(models.Model):
 9    first_name = models.CharField(max_length=20)
10    last_name = models.CharField(max_length=20)
11
12    def __unicode__(self):
13        return u"%s %s" % (self.first_name, self.last_name)
14
15class Car(models.Model):
16    make = models.CharField(max_length=20)
17    model = models.CharField(max_length=20)
18
19    def __unicode__(self):
20        return u"%s %s" % (self.make, self.model)