Re: Inserting data from a text file is not working for Postgres database

2020-05-14 Thread ABHIJIT PATKAR
Try to give complete path of file and try again Thank you, Abhijit On Thu, 14 May, 2020, 10:27 AM Ram, wrote: > Hi, > > We are trying to insert the data from a text file ' > *some_category_list.txt*'' into a table in Postgres database using the > highlighted query in our functions.py > > file

Inserting data from a text file is not working for Postgres database

2020-05-13 Thread Ram
Hi, We are trying to insert the data from a text file '*some_category_list.txt*'' into a table in Postgres database using the highlighted query in our functions.py file = open(str(a)+'_category_list.txt', 'r') > file_content = file.read() > print(file_content) > file.close() > from django.db