You can use the Fixtures feature

First, pass to csv your spreadsheet

Then, you have in mind the model or set of models....

ModelA
ModelB

The fields, the data type for every field.

Then, convert to a file of JSON to load with the fixture command.

I can share with you my code that do that:
https://gitlab.com/pineiden/csv-2-json


Other path is loading the django settings and reading every row and convert
to a dict and init the object
Like this.
https://gitlab.com/pineiden/websocketsoftware/-/blob/master/websocketdatamanager/DjangoDataManager.py

Any question, write to me ;)






El vie., 8 may. 2020 a las 8:04, ratnadeep ray (<[email protected]>)
escribió:

> Hi all,
>
> Can anyone let me know how to push the fetched data from an excel to any
> DB using Django?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/1e970207-0c86-4925-b4c8-dbce7c7c069d%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/1e970207-0c86-4925-b4c8-dbce7c7c069d%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Ingeniero Civil Electricista U. de Chile
F: +56 9 82142267 - [email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAM2MghgmJ%3Drdp%2B-UqHidr5mcNwEXVea4oG3xQEH0_x3VS9CvjQ%40mail.gmail.com.

Reply via email to