Ignore:
Timestamp:
Apr 13, 2011, 8:05:10 PM (14 years ago)
Author:
dennisw
Message:

manage.py kan nu worden gerunned vanuit project root met './manage.py'
settings, models en schemes aangepast

Location:
src/django_gheat/gheat
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • src/django_gheat/gheat/base.py

    r9026 r9041  
    1 import settings
    21import datetime
    32import os
  • src/django_gheat/gheat/models.py

    r9026 r9041  
    22from gheat import managers
    33import datetime
    4 
    54
    65class Accespoint(models.Model):
     
    98        encryptie = models.BooleanField()
    109        def __unicode__(self):
    11                 return (self.mac, self.ssid)
    12 
     10                return "%s - %s" % (self.mac, self.ssid)
    1311
    1412class 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)
    1715        def __unicode__(self):
    18                 return (self.gebruiker, self.apparatuur)
     16                return "%s - %s" % (self.naam, self.email)
    1917
     18class 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
     24class 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)
    2031
    2132class Meting(models.Model):
     33        meetrondje = models.ForeignKey(MeetRondje)
    2234        accespoint = models.ForeignKey(Accespoint)
    23         gebruiker = models.ForeignKey(Gebruiker)
    2435        latitude = models.FloatField(name='Latitude', db_column='lat')
    2536        longitude = models.FloatField(name='Longitude', db_column='lng')
    2637        signaal = models.IntegerField(max_length=3)
    27         datum = models.DateTimeField()
    28 
    2938        objects = managers.MetingManager()
  • src/django_gheat/gheat/views.py

    r9006 r9041  
    2727        x = int(x)
    2828        y = int(y)
    29         assert 0 <= zoom <= 30, "bad zoom: %d" % zoom
     29        assert 0 <= zoom <= 17, "bad zoom: %d" % zoom
    3030    except AssertionError, err:
    3131        return HttpResponseBadRequest()
Note: See TracChangeset for help on using the changeset viewer.