Hi - I am trying to upload data from a CSV file. But I have to do some
processing before saving the data (such as slugifying a field). I am
trying to use the example provided by fellow users on this thread
(http://groups.google.com/group/django-users/browse_thread/thread/
b12bfeb6af4978bb/88d3b1f40e3b4a8b?lnk=gst&q=modeladmin+as+a+batch
+function#88d3b1f40e3b4a8b).

I am having trouble understanding the flow. What does "cleaned_data"
do? Is it loading the entire file or just the first row? If latter,
where is it iterating?

I would appreciate if someone can shed some light on this routine, or
share how you implemented batch import of data using django models.
What I have is a CSV formatted data consisting of "school name,
address1, address2, city, state, url, school type" and I need to
create entries into the School Model, which requires an additional
"calculated" field of a slug (based on school name) and a school type
which is a Foreign Key to SchoolType. The latter two are what I am
trying to process before saving the model.

Help much appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to