~ubuntu-branches/ubuntu/saucy/python-django/saucy-updates

« back to all changes in this revision

Viewing changes to django/contrib/gis/tests/geo3d/models.py

  • Committer: Package Import Robot
  • Author(s): Luke Faraone, Jakub Wilk, Luke Faraone
  • Date: 2013-05-09 15:10:47 UTC
  • mfrom: (1.1.21) (4.4.27 sid)
  • Revision ID: package-import@ubuntu.com-20130509151047-aqv8d71oj9wvcv8c
Tags: 1.5.1-2
[ Jakub Wilk ]
* Use canonical URIs for Vcs-* fields.

[ Luke Faraone ]
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
from django.contrib.gis.db import models
 
2
from django.utils.encoding import python_2_unicode_compatible
2
3
 
 
4
@python_2_unicode_compatible
3
5
class City3D(models.Model):
4
6
    name = models.CharField(max_length=30)
5
7
    point = models.PointField(dim=3)
6
8
    objects = models.GeoManager()
7
9
 
8
 
    def __unicode__(self):
 
10
    def __str__(self):
9
11
        return self.name
10
12
 
 
13
@python_2_unicode_compatible
11
14
class Interstate2D(models.Model):
12
15
    name = models.CharField(max_length=30)
13
16
    line = models.LineStringField(srid=4269)
14
17
    objects = models.GeoManager()
15
18
 
16
 
    def __unicode__(self):
 
19
    def __str__(self):
17
20
        return self.name
18
21
 
 
22
@python_2_unicode_compatible
19
23
class Interstate3D(models.Model):
20
24
    name = models.CharField(max_length=30)
21
25
    line = models.LineStringField(dim=3, srid=4269)
22
26
    objects = models.GeoManager()
23
27
 
24
 
    def __unicode__(self):
 
28
    def __str__(self):
25
29
        return self.name
26
30
 
 
31
@python_2_unicode_compatible
27
32
class InterstateProj2D(models.Model):
28
33
    name = models.CharField(max_length=30)
29
34
    line = models.LineStringField(srid=32140)
30
35
    objects = models.GeoManager()
31
36
 
32
 
    def __unicode__(self):
 
37
    def __str__(self):
33
38
        return self.name
34
39
 
 
40
@python_2_unicode_compatible
35
41
class InterstateProj3D(models.Model):
36
42
    name = models.CharField(max_length=30)
37
43
    line = models.LineStringField(dim=3, srid=32140)
38
44
    objects = models.GeoManager()
39
45
 
40
 
    def __unicode__(self):
 
46
    def __str__(self):
41
47
        return self.name
42
48
 
 
49
@python_2_unicode_compatible
43
50
class Polygon2D(models.Model):
44
51
    name = models.CharField(max_length=30)
45
52
    poly = models.PolygonField(srid=32140)
46
53
    objects = models.GeoManager()
47
 
    
48
 
    def __unicode__(self):
 
54
 
 
55
    def __str__(self):
49
56
        return self.name
50
57
 
 
58
@python_2_unicode_compatible
51
59
class Polygon3D(models.Model):
52
60
    name = models.CharField(max_length=30)
53
61
    poly = models.PolygonField(dim=3, srid=32140)
54
62
    objects = models.GeoManager()
55
 
    
56
 
    def __unicode__(self):
 
63
 
 
64
    def __str__(self):
57
65
        return self.name
58
66
 
59
67
class Point2D(models.Model):