Changeset 9633
- Timestamp:
- Aug 30, 2011, 7:38:52 PM (13 years ago)
- Location:
- src/django_gheat
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/gheat/management/commands/import_datafile.py
r9632 r9633 167 167 if sql_values: 168 168 counters['meting_added'] = bulk_sql('gheat_meting (`meetrondje_id`,\ 169 `accespoint_id`, `lat `, `lng`, `signaal`)',sql_values)169 `accespoint_id`, `latitude`, `longitude`, `signaal`)',sql_values) 170 170 return counters 171 171 -
src/django_gheat/gheat/models.py
r9593 r9633 127 127 def __unicode__(self): 128 128 return "%s - %s" % (self.antenne, self.kaart) 129 class Meta: 130 verbose_name_plural = 'Apparatuur' 129 131 130 132 class MeetRondje(models.Model): 131 datum = models.DateTimeField(blank=True,null=True )133 datum = models.DateTimeField(blank=True,null=True,default=datetime.datetime.now) 132 134 naam = models.CharField(max_length=64) 133 135 gebruiker = models.ForeignKey(Gebruiker) … … 135 137 def __unicode__(self): 136 138 return "%s - %s" % (self.gebruiker.naam, self.naam) 139 class Meta: 140 verbose_name_plural = 'MeetRondjes' 137 141 138 142 class MeetBestand(models.Model): 139 143 meetrondje = models.ForeignKey(MeetRondje) 140 bestand = models.FileField(upload_to='meet-bestand/%Y/%m/%d') 144 bestand = models.FileField(upload_to='scan-data/%Y/%m/%d') 145 is_imported = models.BooleanField(default=False) 146 class Meta: 147 verbose_name_plural = 'MeetBestanden' 141 148 142 149 … … 144 151 meetrondje = models.ForeignKey(MeetRondje) 145 152 accespoint = models.ForeignKey(Accespoint) 146 latitude = models.FloatField( name='Latitude', db_column='lat')147 longitude = models.FloatField( name='Longitude', db_column='lng')153 latitude = models.FloatField() 154 longitude = models.FloatField() 148 155 signaal = models.IntegerField(max_length=3) 149 156 objects = managers.MetingManager() … … 155 162 # this properly hold. 156 163 unique_together = ('meetrondje', 'accespoint', 'latitude', 'longitude'), 164 verbose_name_plural = 'Metingen' 165 -
src/django_gheat/urls.py
r9547 r9633 28 28 ) 29 29 30 30 31 if settings.DEBUG: 31 32 urlpatterns += staticfiles_urlpatterns() 32 33 urlpatterns += patterns('', 34 url(r'^media/(?P<path>.*)$', 'django.views.static.serve', { 35 'document_root': settings.MEDIA_ROOT, 36 }))
Note:
See TracChangeset
for help on using the changeset viewer.