Django Admin CSV file upload

preview_player
Показать описание
In this django tutorial we build an admin feature to allow admin users to upload csv files so that database tables can be populated automatically.

Code repository:

🐱‍🏍Would you like to SUPPORT US FURTHER so that we can make even more great content - Please consider joining our members community.

👍SUBSCRIBE to get more free tutorials, courses and code snippets!
Рекомендации по теме
Комментарии
Автор

Can I get a suggestion for a better title please?

veryacademy
Автор

You have no idea sir how helpful your videos are, I joined a Mumbai based company as django dev intern and your videos are a life line for me. Please continue making such quality content on django. And thanks a lot!

ishaansharma
Автор

Sir keep making such videos I'm constantly trying to implement ur playlist today I started with ur celery series
Please continue this work sir

yashasbharadwaj
Автор

Sir highly appreciated for ur efforts on Django..keep doing sir, learn a lot from u Sir...love u :)

vasudevareddy
Автор

As always, delightful material which is extraordinary explained and well applicable in any project!

treblaoj
Автор

Pretty great content, keep going. Cheers !!

pawanchaturvedi
Автор

Have you considered doing a video on profiling your queries in Django and interpreting the data to optimize db access? I took a look at Django silk to profile your app and it looks interesting, so I'd love to see a video that explains how to use it and interpret the results, and make modifications accordingly

samuelebonini
Автор

Hey Zander, many thanks for such wonderful videos. The kind of efforts you put in to create these videos is just commendable.


Just curious to know if there's a way to create conditional fields in models. For example, in an accounts model the user can select the expense type from a dropdown with options of (1) petty-cash and (2) order-related... So, lets say if the user selects the 2nd option (order-related), he can see additional fields like order number, invoice number, etc.


In case this is possible, will really appreciate if you can make a video on this. Thanks in advance

ImranKhan-dxfj
Автор

Hello, Thank you a lot for this tutorial. I have similar behaviour but instead of file upload form I have bulk model generator form/page. Everything works well but I really don't know how to render form in same style as in admin change_form.html. Is there any simple way how to do it please?

RadoRajcan
Автор

Great video! Please, what Vscode extension are you using to highlight and suggest the Python codes/tags you wrote in the change_list.html file?

tounji
Автор

hello, how can i export the information of an object from parent model and inline in django admin?? like i want to export order as pdf but i need to see the information in the item and product inline in the pdf file too

aissikram
Автор

Hello guys great video can i extend the function without creating a new admin path and html

titeufintwariyabo
Автор

it shows multivaluedict object is not callable when i upload the csv file ? can you please help me sir.

alantjim
Автор

Hey Zander! great video! really helpful. I was wondering how you would modify that code so it could read .xls and .JSON files? I think that would be a worthy follow-up 😁👌🏾

rubykagaragwa
Автор

Very timely video for a project I'm currently working on. Thank-you. Question: how do I resolve a "list index out of range" error. I think that the list creation is the issue. Every element other than [0] prints with this error. This causes the exception type IndexError. All the values in the .csv do get added to my database. But I get the error after it's done. Any ideas?

mikef
Автор

Writing this comment as I can‘t figure out what the problem is. I‘ve implemented all of your stuff so far but only problem I get is, that there is no button like the one you have where I‘m actually able to select a file. Did you add anything to the html which you didnt show?

simn
Автор

Hey, this video is pretty cool but I run into an error when I try to create the link to upload a new csv file (when it leads to the page that says hello world). For some reason when I click the link it takes me back to the main admin page with the warning at the top saying " 'ObjectName' with ID “upload-csv” doesn’t exist. Perhaps it was deleted?". Do you know what could be causing such a problem?

bwells
Автор

Hi Xander, thanks for this! Just a quick question, why am I getting an IndexError list index out of range? The csv data was added to the my models. But the program breaks, I tried using len and range, but it doesn't seem to do the trick :( what can I do?

kapitankidlattv
Автор

Hey Zander, Where can I find the Base.html?

kasrathekiller
Автор

Great video but any file 5hat is uploaded should have its data validated...

madusan