is there any way to import csv file to django rest framework models? Thank You in advance.
-
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– Anup Yadav2018-02-02 09:06:18 +00:00Commented Feb 2, 2018 at 9:06
-
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– krs2018-02-05 08:45:50 +00:00Commented Feb 5, 2018 at 8:45
Add a comment
|
1 Answer
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.