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")
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.
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?
In the beginning, my app folder name was home2, then after few tutorial and work i rename it as home. Now when I add home at installed app and save it ,it show that " django.core.exceptions.ImproperlyConfigured: Cannot import 'home2'. Check that 'home.apps.Home2Config.name' is correct." how can I solve this probelm. Someone please help me. I am stuck here
7.20 everything is fine but my form is not responded. I am clicking on submit button but no response, no error found . I am sad. Anyone suggest me what's the issue?
21:24 getting an error DataError : integer out of range I searched on Google it says replace int to bigint but im not using thatt . Can anyone help. Thanks in advance
oops I finally got the error. I wrote contact name as phone in HTML but in view file I wrote request.POST['contact']. which should be. request.POST['phone']. :)
Hello Harry Sir ! kindly read comments here ..everyone have one common issue which is when we submit data to db.we are getting an error (Typeerror at contact: contact got an unexpected arguments name.....so plz give us a solution....
hey to fix this issue, you can try renaming either the function or the model to have a different name. Make sure that the function and model names are not the same to avoid naming conflicts.
Here is the playlist: ruclips.net/p/PLK8cqdr55Tsv-D2HMdrnD32oOVBNvmxjr
If possible please share it with your friends :)
what is models.model argument? How it works ?
My problem is almost solved. thank you so much!! How do I solve the "unexpected keyword arguement" problem
I M getting typeerror
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.
Your Django tutorials are by far the best tutorials on this platform.
LLLLLLLLpLLllllLL
I realised i was not patient enough. Your tutorial is actually the best on this youtube platform
You are make me happy 🔥...I did it my 1st django website..❤️
It is very helpful. You are best coder in you tube.
It helped me a lot in my career thanks man keep working
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")
did you solve this error? then please tell how to solve this?
Love From Gujarat Dhiren Nathvani
😍😍😍😍
This is the video I was looking for. Thanku, my conecpt is clear now
Thanks Harry, this was very helpful.
Hello having issues with the contact section the submit is no going through
Well Explained. God bless you sir.
I was very nice to know how to going data to the database
Excellent Tutorial, worked perfectly for me, Thank You.
please any help? at the end it says "unexpected keyword argument"
@@hommastonlimited3187 check your names of html ,model and function it should be same while passing into the function
Thanks! this solved my problem pretty neatly!
I wrote the exact code but iam getting an error saying"MultiValueDictKeyError at /contact
'name'" plz help me to get rid of this error
did you solve this error? then please tell how to solve this?
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.
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?
Thats very good video harry bhai
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
Everything is working. Thanks.
Great.. Thanks for the video
In the beginning, my app folder name was home2, then after few tutorial and work i rename it as home. Now when I add home at installed app and save it ,it show that " django.core.exceptions.ImproperlyConfigured: Cannot import 'home2'. Check that 'home.apps.Home2Config.name' is correct." how can I solve this probelm. Someone please help me. I am stuck here
Awesome work bhai
Hello , i want to ask if your mithod contact has another argument, means like this :
Contact(request,mynumber)
How you will write form action ?
i spent like 2h to solve the issue, it seems that the action field was wrong, silly me
Sir python practice program main chatbot bananekha video bana dijiye pls
7.20 everything is fine but my form is not responded. I am clicking on submit button but no response, no error found . I am sad. Anyone suggest me what's the issue?
use "POST" like this in views.py not this "post"
Same issue 😭😭 please help me i have used 'POST' LIKE only
@@TheRealtorsEstate i had the same problem, and i do it like u mentioned and It's work, thank you :D
Thank you so much! Extremely helpful. ^_^
in this course this #10 part is the most important.
sir i m still getting the same issue please dont run from it help us by making the problem go away
unbelievable !!
Can we create table directly in sql instead of creating in django?
Cool
how is this possible. I did everything you did but I still get UNEXPECTED KEYWORD ARGUEMENT ERROR
Very clear
why you do not upload this video in the main channel?
I got problem in 24:10 that IntegrityError NOT NULL constraint failed: app_user.cat_id
I too get same ..any solution?
Thank you sir ji..!!
21:24 getting an error
DataError : integer out of range
I searched on Google it says replace int to bigint but im not using thatt . Can anyone help. Thanks in advance
I'm getting Multilevel dictkey error.
Plese solve this error
oops I finally got the error. I wrote contact name as phone in HTML but in view file I wrote request.POST['contact']. which should be. request.POST['phone']. :)
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!
i am getting this error while executing the same code
'local variable 'name' referenced before assignment' Can anyone help me?
How to store data in django models if the method ="GET" ???
ur too good
Love you Harry.
ModuleNotFoundError: No module named 'models what can i do for resolve this
In settings.py
Put comma after adding
[
'home',
]
please abeg which one is 'endpoint'
Hello Harry Sir ! kindly read comments here ..everyone have one common issue which is when we submit data to db.we are getting an error (Typeerror at contact: contact got an unexpected arguments name.....so plz give us a solution....
hey to fix this issue, you can try renaming either the function or the model to have a different name. Make sure that the function and model names are not the same to avoid naming conflicts.
from django.shortcuts import render, HttpResponse
from home.models import Contact
def home(request):
return render(request, 'home.html')
def about(request):
return render(request, 'about.html')
def projects(request):
return render(request, 'projects.html')
def contact_form(request):
if request.method == "POST":
name = request.POST['name']
email = request.POST['email']
phone = request.POST['phone']
desc = request.POST.get('desc', '')
contact = Contact(name=name, email=email, phone=phone, desc=desc)
contact.save()
print('Data has been saved to the database')
return render(request, 'contact.html')
from django.db import models
class Contact(models.Model):
name = models.CharField(max_length=30)
email = models.EmailField()
phone = models.CharField(max_length=10)
desc = models.TextField()
try this 🇲🇦💪
Hello Harry bhai ,
I was stuck at 7:12 of this video .
Please help me .
Having issue in Contact section Submit not going through . Please help me
Just add {% csrf_token %}
After the tag
@@javedbakshi9793 did you solve this error? then please tell how to solve this?
so helpful. thanks!
thank you for this
Are you an Indian or a Jewish guy doing an Appu.... Subscribed
Contact() got an unexpected keyword argument 'email'
Are you solve this? Tell me that
did you solve this error? then please tell how to solve this?
How can we save dropdown in database
thanks
Submit doesn't return any data 🥴 please help me resolve this
7th
👌
thank u
contact() got an unexpected keyword argument 'name'
same any solution?
have you found any solution??
@@AnkurSharma-xb8mj yes
did you get any solution?
@@shubhamjaiswal7925 share the solution with me, please
anyone can please tell me how to submit pdf file and restore in database?
How to comment out?
Give us thé link of code in github thanks
I'm got an error
where is source code?
my data is not going in db
did u resolved..?
Heart plzz
20:45
please code
10:34
atleast put github link
9:43
First
20:12