Changeset 9041 for src/django_gheat/gheat
- Timestamp:
- Apr 13, 2011, 8:05:10 PM (14 years ago)
- Location:
- src/django_gheat/gheat
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/gheat/base.py
r9026 r9041 1 import settings2 1 import datetime 3 2 import os -
src/django_gheat/gheat/models.py
r9026 r9041 2 2 from gheat import managers 3 3 import datetime 4 5 4 6 5 class Accespoint(models.Model): … … 9 8 encryptie = models.BooleanField() 10 9 def __unicode__(self): 11 return (self.mac, self.ssid) 12 10 return "%s - %s" % (self.mac, self.ssid) 13 11 14 12 class Gebruiker(models.Model): 15 gebruiker= models.CharField(max_length=64)16 apparatuur= models.CharField(max_length=64)13 naam = models.CharField(max_length=64) 14 email = models.CharField(max_length=64) 17 15 def __unicode__(self): 18 return (self.gebruiker, self.apparatuur)16 return "%s - %s" % (self.naam, self.email) 19 17 18 class Apparatuur(models.Model): 19 antenne = models.CharField(max_length=64) 20 kaart = models.CharField(max_length=64) 21 def __unicode__(self): 22 return "%s - %s" % (self.antenne, self.kaart) 23 24 class MeetRondje(models.Model): 25 datum = models.DateTimeField() 26 naam = models.CharField(max_length=60) 27 gebruiker = models.ForeignKey(Gebruiker) 28 apparatuur = models.ForeignKey(Apparatuur) 29 def __unicode__(self): 30 return "%s - %s" % (self.naam) 20 31 21 32 class Meting(models.Model): 33 meetrondje = models.ForeignKey(MeetRondje) 22 34 accespoint = models.ForeignKey(Accespoint) 23 gebruiker = models.ForeignKey(Gebruiker)24 35 latitude = models.FloatField(name='Latitude', db_column='lat') 25 36 longitude = models.FloatField(name='Longitude', db_column='lng') 26 37 signaal = models.IntegerField(max_length=3) 27 datum = models.DateTimeField()28 29 38 objects = managers.MetingManager() -
src/django_gheat/gheat/views.py
r9006 r9041 27 27 x = int(x) 28 28 y = int(y) 29 assert 0 <= zoom <= 30, "bad zoom: %d" % zoom29 assert 0 <= zoom <= 17, "bad zoom: %d" % zoom 30 30 except AssertionError, err: 31 31 return HttpResponseBadRequest()
Note:
See TracChangeset
for help on using the changeset viewer.