Ignore:
Timestamp:
Aug 30, 2011, 8:10:12 PM (13 years ago)
Author:
rick
Message:

Make sure we store the file we process.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/django_gheat/gheat/management/commands/import_datafile.py

    r9633 r9637  
    1010#
    1111from _mysql_exceptions import OperationalError
     12from django.core.files import File
    1213from django.core.management.base import BaseCommand,CommandError
    1314from django.db import connection, transaction
     
    267268        }
    268269      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
    269274      fh = open_file(filename)
    270275      if 'ns1' in filename:
Note: See TracChangeset for help on using the changeset viewer.