Re: importing csv data into database

2015-04-26 Thread sum abiut
wow! Thanks heaps Mario :) . it works like a champ, Thank you James and Andrew for the directions. you guys were a great help. Cheers On Mon, Apr 27, 2015 at 12:10 PM, Mario Gudelj wrote: > Remove comma from each line inside the for loop. > On 27/04/2015 10:44 am, "sum abiut" wrote: > >> Hi An

Re: importing csv data into database

2015-04-26 Thread Mario Gudelj
Remove comma from each line inside the for loop. On 27/04/2015 10:44 am, "sum abiut" wrote: > Hi Andrew, > Thanks heaps. do you mine explaining how to fix that. > > cheers, > > On Mon, Apr 27, 2015 at 4:26 AM, Andrew Farrell > wrote: > >> What I'm saying that you are defining data.LastName as a

Re: importing csv data into database

2015-04-26 Thread sum abiut
Hi Andrew, Thanks heaps. do you mine explaining how to fix that. cheers, On Mon, Apr 27, 2015 at 4:26 AM, Andrew Farrell wrote: > What I'm saying that you are defining data.LastName as a tuple and when it > gets turned into a string. So if a row is > > 44, Barack, Obama, 1600 Pennsylvania Avenu

Re: Django Migrations - Relation Already Exists

2015-04-26 Thread marcin . j . nowak
I'm not a newbie. Just avoid Django (South) migrations and syncdb. My advice - generate complete SQL for your project (based on migrations or sql and sqlindexes commands), move changes to reliable tool (i.e. Liquibase) as an initial migration, tune changesets if needed, and forget about builtin

Re: Migrations During Development

2015-04-26 Thread marcin . j . nowak
It depends about your workflow - if migrations were applied only on your machine, revert them and modify. South migrations (and Django migrations, which were based on South) may be problematic in speific cases, i.e. during merging or when executed unintentionally from uncleaned *.pyc files, but

Re: Turn off migrations completely in Django 1.7

2015-04-26 Thread marcin . j . nowak
So what about that? I'm also interested in disabling migrations. I need to upgrade Django in big project (from 1.4 to newer version) because of lack of support for 1.4, but migrations included in v1.7 will complicate this process. I want to disable everything related to migrations. We're using

Re: importing csv data into database

2015-04-26 Thread Andrew Farrell
What I'm saying that you are defining data.LastName as a tuple and when it gets turned into a string. So if a row is 44, Barack, Obama, 1600 Pennsylvania Avenue Then data.FirstName is going to be ('Barack',) Which is a single-element tuple. When it gets turned into a string, it becomes ('Barack

Re: importing csv data into database

2015-04-26 Thread sum abiut
i am importing data from csv file to the model test, so i am taking data as an instance of test(). are you saying i should define data as a string?? and have the parameters as personid, firstname,lastname,address. Please advise Cheers On Sun, Apr 26, 2015 at 2:36 AM, Andrew Farrell wrote: > A