1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #10154: Allow combining F expressions with timedelta values.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15018 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Karen Tracey
2010-12-22 03:34:04 +00:00
parent f0cd656ee0
commit b1f6a4d66f
11 changed files with 360 additions and 4 deletions

View File

@@ -10,3 +10,16 @@ class Number(models.Model):
def __unicode__(self):
return u'%i, %.3f' % (self.integer, self.float)
class Experiment(models.Model):
name = models.CharField(max_length=24)
assigned = models.DateField()
completed = models.DateField()
start = models.DateTimeField()
end = models.DateTimeField()
class Meta:
ordering = ('name',)
def duration(self):
return self.end - self.start