Re: Create data from django models from .csv file using pandas library

2018-10-15 Thread Mohammad Aqib
by > Mailtrack > <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality6&;> > 10/15/18, > 5:03:59 PM > > On Mon, Oct 15, 2018 at 4:42 PM Mohammad Aqib > wrote: > >> I have multiple .csv files to create data from django

Create data from django models from .csv file using pandas library

2018-10-15 Thread Mohammad Aqib
I have multiple .csv files to create data from django models into a database using python pandas library. Can anyone suggest me how to do perform this task. import pandas as pd df = pd.read_csv(RESOURCE_ROOT + '/data_files/102018_core_business.csv') business_instance, created = Business.objects.

Re: How to migrate old database into new database using python script

2018-10-11 Thread Mohammad Aqib
o > be using postgres as well, I can help further. > > On Thu, Oct 11, 2018 at 5:03 AM Mohammad Shareef M > wrote: > >> Create new database and Restore the backup file >> >> Thanks & Regards, >> Mahammad Shareef M >> +919741482617 >> +9

How to migrate old database into new database using python script

2018-10-11 Thread Mohammad Aqib
Hi All, I have a task to migrate all data into a new database using "backup.sql" file. How to write a Python script to do this task. Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails

Re: How to save multiple model form in one template?

2018-09-07 Thread Mohammad Aqib
Show your models.py. On Fri, Sep 7, 2018 at 4:13 PM Django Lover wrote: > > I have one page, which I have to show three model form and three > different submit button for each. > > My question is how I can save these three form individually? > > FOLLOWING IS CODE:- > > **form.py** > > > class Us

Re: Hi

2018-09-03 Thread Mohammad Aqib
Add below line into your model. image = models.ImageField(upload_to='pathwheretoupload') On Mon, 3 Sep 2018, 10:41 pm Mikhailo Keda, wrote: > Check the docs - > https://docs.djangoproject.com/en/2.1/ref/models/fields/#django.db.models.ImageField >> >> -- > You received this message because you

Re: Error: Not able to create table using models (Backend mysql)

2018-08-28 Thread Mohammad Aqib
This password doesn't belong to mysql. This belongs to your database 'hospital'. On Wed, Aug 29, 2018 at 10:07 AM Sonali Vighne wrote: > I have not set password to My MySQL server during installation > > On Tuesday, August 28, 2018 at 5:42:30 PM UTC+5:30, Mohammad Aqi

Re: Error: Not able to create table using models (Backend mysql)

2018-08-28 Thread Mohammad Aqib
Set mysql password. Without password how you can access mysql. See DATABASES = { *'default'*: { *'ENGINE'*: *'django.db.backends.mysql'*, *'NAME'*: *'hospital'*, *'USER'*: *'root'*, *'PASSWORD'*: *'password'*, *'HOST'*: *'localhost'*, *'

Re: Error: Not able to create table using models (Backend mysql)

2018-08-28 Thread Mohammad Aqib
make sure you have installed correct Django and MySQLclient versions. If not try to change the versions. or give permissions to user grant usage on schema public to username;grant create on schema public to username; On Tue, Aug 28, 2018 at 1:20 PM Sonali Vighne wrote: > > I am getting this e