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

« back to all changes in this revision

Viewing changes to tests/expressions_regress/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:
8
8
 
9
9
@python_2_unicode_compatible
10
10
class Number(models.Model):
11
 
    integer = models.IntegerField(db_column='the_integer')
 
11
    integer = models.BigIntegerField(db_column='the_integer')
12
12
    float = models.FloatField(null=True, db_column='the_float')
13
13
 
14
14
    def __str__(self):
15
15
        return '%i, %.3f' % (self.integer, self.float)
16
16
 
 
17
 
17
18
class Experiment(models.Model):
18
19
    name = models.CharField(max_length=24)
19
20
    assigned = models.DateField()
26
27
 
27
28
    def duration(self):
28
29
        return self.end - self.start
29