TypeError at /register User() got unexpected keyword arguments: 'name1', 'name2', 'country'

752 views
Skip to first unread message

Ebenezer Otchere

unread,
Mar 29, 2023, 10:21:06 PM3/29/23
to Django users
I am trying to collect user information and save in my database but i keep getting this error
and i dont know the way around it so help me the codes and the error page are below
Screenshot (3).pngScreenshot (4).pngScreenshot (5).png 

Muhammad Juwaini Abdul Rahman

unread,
Mar 30, 2023, 12:34:59 AM3/30/23
to django...@googlegroups.com
In default User models, there are no columns 'name1' and 'name2'.


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4eca1c0d-b010-4479-9018-ab2ad939d819n%40googlegroups.com.

Alex Sonar

unread,
Mar 30, 2023, 4:58:10 AM3/30/23
to Django users
Hi Ebenezer, Could I ask you to show the content of the model file, please?

Ebenezer Otchere

unread,
Mar 30, 2023, 5:30:01 AM3/30/23
to Django users
ohk below is the screenshoot of the model.py
Screenshot (6).png

Karthik V A

unread,
Mar 30, 2023, 9:36:28 AM3/30/23
to django...@googlegroups.com
Put "" quotes in variables

--

Fathimanesmi As

unread,
Mar 30, 2023, 9:36:34 AM3/30/23
to Django users
django user has the following fields model :
user = User.objects.create_user(first_name=name1, last_name= name2)
user.save()

Reply all
Reply to author
Forward
0 new messages