This was far too broad to answer but I'm posting the solution I'm currently 
implementing in case anyone else comes across this.

I have two models in the back end.

The first model has a JSONmodelfield (
https://github.com/bradjasper/django-jsonfield) and  four intfields to save 
the columns numbers for street address, suburb, state, postcode)

I will use jquery and papa parse(http://papaparse.com/) on a modelform to 
process the csv file clientside, save the json into the hidden 
JSONmodelfield and create dropdown selections from the csv headers the 
selection from each of these dropdowns is also passed to the hidden 
 intfields. On save() the json is processed using the values in the 
intfields to populate a second model.

The second model just has 4 charfields for the street address, suburb, 
state, postcode.







On Friday, 16 January 2015 13:24:13 UTC+10:30, David Mutton wrote:
>
> Please let me know if this is an inappropriate question. I feel it is a 
> little broad.
>
> I am fairly new to Django and coding an app for educational purposes. What 
> I am trying to achieve is to allow users to upload a CSV and then populate 
> a model by specifying that datatype that is in each column of the CSV. I’m 
> fine with the first half (users can upload csv which are then processed 
> into a PropertyQuery model but currently they would need to download a 
> template CSV file and ensure they conform to it. I’d like them to be able 
> to upload any CSV and then specify the column’s data.
>
> I don’t need a step by step explanation on how to achieve this but after 
> spending a fair chunk of time searching I could use a pointer.
>
> I hope that my flowchart below explains it better.
>
> Many thanks.
>
>
> <https://lh5.googleusercontent.com/-tVJ3uUxlrEk/VLh9RViDypI/AAAAAAAAA5U/fv34Zq-Y4Qs/s1600/flowchart.png>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6a70ebcd-6696-4a25-8ceb-e0b5fcc71a80%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to