Changeset 9637 for src/django_gheat/gheat
- Timestamp:
- Aug 30, 2011, 8:10:12 PM (13 years ago)
- Location:
- src/django_gheat/gheat
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/gheat/admin.py
r9593 r9637 24 24 admin.site.register(Organization, OrganizationAdmin) 25 25 26 class MeetBestandAdmin(admin.ModelAdmin): 27 list_display = ['meetrondje', 'bestand', 'is_imported'] 28 admin.site.register(MeetBestand, MeetBestandAdmin) 29 26 30 admin.site.register(Apparatuur) 27 31 admin.site.register(Gebruiker) -
src/django_gheat/gheat/management/commands/import_datafile.py
r9633 r9637 10 10 # 11 11 from _mysql_exceptions import OperationalError 12 from django.core.files import File 12 13 from django.core.management.base import BaseCommand,CommandError 13 14 from django.db import connection, transaction … … 267 268 } 268 269 logger.info('Meetrondje: %s', mr) 270 meetbestand = MeetBestand(meetrondje=mr,is_imported=True) 271 meetbestand.bestand.save(os.path.basename(filename),File(open(filename))) 272 meetbestand.save() 273 269 274 fh = open_file(filename) 270 275 if 'ns1' in filename: -
src/django_gheat/gheat/models.py
r9633 r9637 146 146 class Meta: 147 147 verbose_name_plural = 'MeetBestanden' 148 def __unicode__(self): 149 return "%s - %s" % (self.meetrondje, self.bestand) 148 150 149 151
Note:
See TracChangeset
for help on using the changeset viewer.