For import the data from csv file to database (Sqlite3). I have to download sqlite3.exe file from https://www.sqlite.org/download.html and then run the following command in cmd
sqlite3 db.sqlite3
.mode csv
.import data.csv tasktwo_salesModel
Now check your database. You will see the data is imported successfully.
API Endpoints for "data insertion and manipulation" of sales model for app tasktwo
Insertion and get list of data
POST http://127.0.0.1:8000/api/sales/v1/sales
Update, Delete and get single data
PUT http://127.0.0.1:8000/api/sales/v1/sales/1
DELETE http://127.0.0.1:8000/api/sales/v1/sales/1
GET http://127.0.0.1:8000/api/sales/v1/sales/1
Generate PDF file API
GET http://127.0.0.1:8000/api/sales/v1/report/
Generate CSV file API (Additional Feature Used)
GET http://127.0.0.1:8000/api/sales/v1/csv/
Generate PDF file will be found inside project folder