2009/11/12 Dirk Uys <
dirk...@gmail.com>:
Technically, i think you should be able iterate over dataset imported
from CVS and bound each data row to form, validate the form and then
use the cleaned_data to create an object of the Model and save it or
whatever. Not sure what performance impacts this would have, if any,
but i guess that would depend on the amount of data that needs
validation.
Take a look at [1] forms API for example.
Also you could factor out the clean code into standalone function for
example and then use that function to validate the given data both in
form and the place you use imported data.
But then again i am no guru on the subject, these are just my opinions.
[1]
http://docs.djangoproject.com/en/dev/ref/forms/api/