- Timestamp:
- Apr 13, 2011, 8:05:10 PM (14 years ago)
- Location:
- src/django_gheat
- Files:
-
- 5 added
- 6 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() -
src/django_gheat/samples/persisted/settings.py
r9026 r9041 89 89 'django_extensions', 90 90 'home', 91 'django.contrib.admin', 91 92 ) 92 93 -
src/django_gheat/samples/persisted/urls.py
r9006 r9041 2 2 3 3 # Uncomment the next two lines to enable the admin: 4 #from django.contrib import admin5 #admin.autodiscover()4 from django.contrib import admin 5 admin.autodiscover() 6 6 7 7 urlpatterns = patterns('', … … 9 9 (r'^home/', include('home.urls')), 10 10 (r'^gheat/', include('gheat.urls')), 11 11 (r'^admin/', include(admin.site.urls)), 12 12 )
Note:
See TracChangeset
for help on using the changeset viewer.