source: src/django_gheat/gheat/models.py@ 9006

Last change on this file since 9006 was 9006, checked in by dennisw, 14 years ago

django_gheat - versie van gheat die gebruik maakt van django framework, ondersteunt SQL connecties in tegenstelling tot gheat dat gebruik maakt van sqlite

File size: 732 bytes
Line 
1from django.db import models
2from gheat import managers
3
4# Create your models here.
5class Point(models.Model):
6 """
7 A simple representation of a point inside the gheat database
8 """
9 uid = models.CharField(max_length=100, name='unique identifier')
10 latitude = models.FloatField(name='Latitude', db_column='lat', blank=True)
11 longitude = models.FloatField(name='Longitude', db_column='lng', blank=True)
12 modtime = models.DateTimeField(auto_now = True,
13 name='Last modification time', null=True)
14 density = models.PositiveIntegerField(default=0, editable=False,
15 name='density of the current point')
16
17 objects = managers.PointManager()
18
19 class Meta:
20 unique_together = ('uid',)
Note: See TracBrowser for help on using the repository browser.