Models in Django: Saving Form Data To The Database | Django Tutorial #10

preview_player
Показать описание
In this Django course, We will see how to create awesome django websites from starting to the end. Also we will see how to build few of amazing projects in Django.
Рекомендации по теме
Комментарии
Автор

If possible please share it with your friends :)

ProgrammingWithHarry
Автор

Why didn't youtube recommend me your channel is beyond my comprehension . Dude, you are damn good . I could have saved days on learning the concepts.

nikhil
Автор

Your Django tutorials are by far the best tutorials on this platform.

aliemarah
Автор

I realised i was not patient enough. Your tutorial is actually the best on this youtube platform

hommastonlimited
Автор

It is very helpful. You are best coder in you tube.

engineerbhai
Автор

It helped me a lot in my career thanks man keep working

ronmanmemes
Автор

Thanks! this solved my problem pretty neatly!

aninstinctkiller
Автор

You are make me happy 🔥...I did it my 1st django website..❤️

thekishore
Автор

This is the video I was looking for. Thanku, my conecpt is clear now

deepanshuyadavcs
Автор

I only get contact() got an unexpected keyword argument 'name' when i clicked on submit, what could be the problem?

This is my code:
def contact(request):
if request.method=="POST":
name = request.POST["name"]
email = request.POST["email"]
phone = request.POST["phone"]
desc = request.POST["desc"]
#print(name, email, phone, desc)
ins = contact(name=name, email=email, phone=phone, desc=desc)
ins.save()
print("The data has been saved.")
return render(request, "contact.html")

tino
Автор

Thank you so much! Extremely helpful. ^_^

komalsharma-mlyb
Автор

In this case we've use raw html form. Can't we use django forms or Model form for this? With the same bootstrap styles? Bcz, those are very powerful forms. But I don't know how to make those form with interactive designs. Hope u will answer for this. Thanks.

misfarsiddeek
Автор

Excellent Tutorial, worked perfectly for me, Thank You.

LetterfromourDearGod
Автор

Hello having issues with the contact section the submit is no going through

lyricsbeatz
Автор

Can we create table directly in sql instead of creating in django?

khizerrashid
Автор

Hello, i want to ask if your mithod contact has another argument, means like this :
Contact(request, mynumber)
How you will write form action ?

ndhijazi
Автор

Hi! I NEED HELP! PLEASE! How can i do post method when I have only one html file where the pages are created using id? Please explain

rafsanjahin
Автор

I was very nice to know how to going data to the database

krishanasaini
Автор

Bro, Need a quick help.... I have been learing Django from ur videos and stuck somewhere. I am working on a page which has 2 fields - years and months as fields and trying to store in SQLite. In the data base both are defined as models.PositiveIntegerField(default=0, blank=True)
Now from the html page I am trying to enter the data and keeping one of the fields as blank. I keep getting the below mentioned error
Field 'years' expected a number but got ''.

Can you help and tell me how to fix this issue?

rikhavthakkar
Автор

I have a data type as (input type="radio") in HTML file and I cant find appropriate model attribute for the same please help me out someone!

parthverma