How to create objects in the Django database from a CSV file upload

preview_player
Показать описание
How to create objects in the Django database from a CSV file upload

Learn how to create objects in the Django ORM database from a CSV file upload.
Calculate the total price based on the quantity and item price by overriding the save method.

🔥 Join the facebook group:

🔥 Follow pyplane on:

🔥 More on python and django:

Sales data file download:

Django with data science FULL udemy course:

#django #csv #files

django ,csv django, python, django3, python3, csv, csv upload, django ORM, ORM, csv to database, create objects from fille, save method, django tutorial, learn django, django framework, python programming language, python tutorial, python 3, django csv import tutorial, django csv import, django csv to database, django file upload, django project, django file upload model, django file upload html, django csv
Рекомендации по теме
Комментарии
Автор

This is by far the best and most complete explanation of importing csvs to a database in django. I also appreciate other videos from the same person.

jeffreypowell
Автор

Nice tutorial, thanks a lot! Very professional :) Greetings from Warsaw ;)

jennykow
Автор

thank you for the tutorial! It works great!!

chuckli
Автор

Thank you so much my friend. This course help me more to practice Django.I will follow your channel

elysetombojara
Автор

Thanks for wonderful tutorial. I just smashed the subscribed button!

edcyn
Автор

Very good idea, thank you for sharing.

thetruereality
Автор

💯 You're the man! Well Explained.

DemolaOkesola
Автор

Thank you. It works perfect, while when the load is large you need to use window.location.href = url
and prevent the default behavior of redirection of the form using Iframe:

<iframe name="hiddenFrame" width="0" height="0" border="0" style="display: none;"></iframe>

<form action="/Car/Edit/17" id="myForm" method="post" name="myForm" target="hiddenFrame"> ... </form>

adelabu-ghazaleh
Автор

this just saved my computer science coursework, thank you!!!

haileeisabella
Автор

really awesome tutorial! i tried other ones but none of them worked for csv. Nicely taught!

mayurg
Автор

My guy you saved me. Thank you so much!

santiagoagulla
Автор

sir thank you very much for your tutorial.

mitaakter
Автор

so can we create a table for every csv file upload we make ?

harshamachine_learning
Автор

Hi, thanks for the nice vedio. I try to follow your instruction and run into a problem at the very end, it pops out "unsupported operand type(s) for *: 'NoneType' and 'int' " Can you provide me some suggestions to deal with it?

chia-hunglee
Автор

kept getting "multiple objects Returned at/" when using the Csv.objects.get() method. Would've used filter, but didn't know what to filter on because all the csv's were the same.

MA-ekxl
Автор

How do you keep duplicates out when importing a .CSV file?

MoreNaturalDisaster
Автор

Well summarized tutorial on importing csv to DRF API. This was very helpful.
Is there a way you can do multiple csv files contents import one after another?
That would a nice thing to know.
Thank you for sharing. Already liked and subscribed for a while now!

bijoysaraf
Автор

Hi guys,
I have problem with running this
I have: '''IndexError: list index out of range''' or errors with types(float, int, None)

PP-tczp
Автор

How can we send that csv file from one function to another ?

jameskulu
Автор

How can we add some logic to avoid duplicate entries for the incoming data. For example I am able to save the excel file in my database using to_sql. I have to validate that no two duplicate entries can be created for a column in this case I have title column and validate if two products have same title or name, the entry does not get added to the database.

venkyslarky