is there any way to import csv file to django rest framework models? Thank You in advance.
Asked
Active
Viewed 1,940 times
1
-
I don't know why you got negative vote. But there is no REST Framework option available, you can do this using custom / raw solution. – Anup Yadav Feb 02 '18 at 09:06
-
1appreciated thanks! – Hallucinate Feb 05 '18 at 00:51
-
The app django-import-export does this easily for you in django admin and can probably be tied in to a serializers quite easy. – krs Feb 05 '18 at 08:45
-
Welcome to Stackoverflow. If you found any of the answers useful you should consider up-vote and select the correct answer :) – Gal Silberman Mar 25 '18 at 12:02
1 Answers
1
Using python csv you can open/read/write/modify any csv file.
Using this method, you can parse your file and save it using DRF.
I wont post any code because its a general understanding question. Good Luck.
Gal Silberman
- 3,491
- 4
- 30
- 56