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")
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?
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
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.
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']. :)
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
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: czcams.com/play/PLK8cqdr55Tsv-D2HMdrnD32oOVBNvmxjr.html
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
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?
It is very helpful. You are best coder in you tube.
You are make me happy 🔥...I did it my 1st django website..❤️
It helped me a lot in my career thanks man keep working
Love From Gujarat Dhiren Nathvani
😍😍😍😍
This is the video I was looking for. Thanku, my conecpt is clear now
Cool
Thanks! this solved my problem pretty neatly!
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.
unbelievable !!
I was very nice to know how to going data to the database
Everything is working. Thanks.
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
I'm getting Multilevel dictkey error.
Plese solve this error
Great.. Thanks for the video
Thats very good video harry bhai
Thank you so much! Extremely helpful. ^_^
Awesome work bhai
in this course this #10 part is the most important.
Very clear
Sir python practice program main chatbot bananekha video bana dijiye pls
Thank you sir ji..!!
i spent like 2h to solve the issue, it seems that the action field was wrong, silly me
thanks
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
thank you for this
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?
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
sir i m still getting the same issue please dont run from it help us by making the problem go away
Love you Harry.
ur too good
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
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.
Hello , i want to ask if your mithod contact has another argument, means like this :
Contact(request,mynumber)
How you will write form action ?
thank u
how is this possible. I did everything you did but I still get UNEXPECTED KEYWORD ARGUEMENT ERROR
Can we create table directly in sql instead of creating in django?
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 got problem in 24:10 that IntegrityError NOT NULL constraint failed: app_user.cat_id
I too get same ..any solution?
why you do not upload this video in the main channel?
so helpful. thanks!
i am getting this error while executing the same code
'local variable 'name' referenced before assignment' Can anyone help me?
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
please abeg which one is 'endpoint'
How to comment out?
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!
How to store data in django models if the method ="GET" ???
7th
👌
ModuleNotFoundError: No module named 'models what can i do for resolve this
In settings.py
Put comma after adding
[
'home',
]
How can we save dropdown in database
I'm got an error
Submit doesn't return any data 🥴 please help me resolve 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?
20:45
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?
my data is not going in db
did u resolved..?
anyone can please tell me how to submit pdf file and restore in database?
10:34
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 🇲🇦💪
Give us thé link of code in github thanks
where is source code?
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
9:43
please code
Heart plzz
First
atleast put github link
20:12