django user has the following fields model :

   - username 
   
<https://docs.djangoproject.com/en/4.1/ref/contrib/auth/#django.contrib.auth.models.User.username>
   - password 
   
<https://docs.djangoproject.com/en/4.1/ref/contrib/auth/#django.contrib.auth.models.User.password>
   - email 
   
<https://docs.djangoproject.com/en/4.1/ref/contrib/auth/#django.contrib.auth.models.User.email>
   - first_name 
   
<https://docs.djangoproject.com/en/4.1/ref/contrib/auth/#django.contrib.auth.models.User.first_name>
   - last_name 
   
<https://docs.djangoproject.com/en/4.1/ref/contrib/auth/#django.contrib.auth.models.User.last_name>
   there is no name1 and name2 attributes.Refer to the django documentation 
   for full details.

user = User.objects.create_user(first_name=name1, last_name= name2)
user.save()

On Thursday, 30 March, 2023 at 5:30:01 am UTC-4 Ebenezer Otchere wrote:

> ohk below is the screenshoot of the model.py
> [image: Screenshot (6).png]
>
> On Thursday, March 30, 2023 at 1:58:10 AM UTC-7 Alex Sonar wrote:
>
>> Hi Ebenezer, Could I ask you to show the content of the model file, 
>> please?
>>
>> On Thursday, March 30, 2023 at 5:21:06 AM UTC+3 Ebenezer Otchere wrote:
>>
>>> 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
>>> [image: Screenshot (3).png][image: Screenshot (4).png][image: 
>>> Screenshot (5).png] 
>>>
>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/725f18b1-0ad2-45ce-a075-f9dcdd316018n%40googlegroups.com.

Reply via email to