Signed-off-by: Jason Myers <jason@jasonamyers.com>
This commit is contained in:
Jason Myers 2013-11-02 17:50:35 -05:00
parent 8eec2d93b6
commit 3f115776e1
16 changed files with 172 additions and 5 deletions

View file

@ -16,6 +16,7 @@ class Band(models.Model):
def __str__(self):
return self.name
class Concert(models.Model):
main_band = models.ForeignKey(Band, related_name='main_concerts')
opening_band = models.ForeignKey(Band, related_name='opening_concerts',
@ -27,6 +28,7 @@ class Concert(models.Model):
(3, 'Bus')
), blank=True)
class ValidationTestModel(models.Model):
name = models.CharField(max_length=100)
slug = models.SlugField()
@ -40,5 +42,6 @@ class ValidationTestModel(models.Model):
def decade_published_in(self):
return self.pub_date.strftime('%Y')[:3] + "0's"
class ValidationTestInlineModel(models.Model):
parent = models.ForeignKey(ValidationTestModel)