0

I'm developing a django application that will need regular updates of its database from a number of CSV files. These will need to be uploaded via the web interface. Are there any libraries/modules that I should look at to make this easier?

Victor

askvictor
  • 3,621
  • 4
  • 32
  • 45
  • Looks like this will do what I need http://stackoverflow.com/questions/3974620/import-csv-data-into-database-in-django-admin – askvictor Jul 18 '12 at 04:11

2 Answers2

2

You can make use of Django import_export.

Dawn T Cherian
  • 4,968
  • 3
  • 24
  • 35
-1

Making what easier? Your question is rather vague, but from what I understand you would need something to scedule the job at regular intervals. This could be done in lots of ways, but usually by a python script and a cronjob or a celery task.

Hedde van der Heide
  • 21,841
  • 13
  • 71
  • 100
  • I'm referring to the uploading and parsing of the file. The uploading of the file will be done manually; I'm not interested in scheduling that. – askvictor Jul 17 '12 at 09:39
  • You could just use python's csv module and django's serializers, I was referring to sceduling because parsing large files on model save seems wrong – Hedde van der Heide Jul 17 '12 at 09:41
  • Can django deserialize from a CSV? Why is parsing large files on model save wrong? (btw by regularly I meant a few times a year) – askvictor Jul 17 '12 at 09:46
  • If you intend to parse a large upload with the save method of a django model(form), you will need to deal with a user that's just watching for a response to return (which might take a while) also you would have to handle errors when parsing fails. It seems likely to create a task for things like this and email a report, but tbh that's just my personal opinion :-) – Hedde van der Heide Jul 17 '12 at 09:54