views:

142

answers:

2

Is it possible to use threading when importing data from csv files to django.

A: 

I don't know if i got it right.

I've never used threads with django, but this article can help you: http://www.artfulcode.net/articles/threading-django/

In a few words, it's possible to use threads with django, specially when doing IO stuff (so I guess it's ok to read a csv file). But I think it's no use if you intend to import the data from the csv to the database.

Bruno Gola
+1  A: 

Django is Python, so yeah you can use threads, processing etc. Look at python docs on this matter.

But, spawning threads in web environment might be not be such a good idea, try searching here for "django asynchronous" - you'll get many ideas of how to this without threading.

Dmitry Shevchenko