help on extending user model using django rest_framework

20 views
Skip to first unread message

ola neat

unread,
Jul 30, 2020, 6:30:33 AM7/30/20
to django...@googlegroups.com
good day fellaz, i'm working on extending my user model to enable user create a profile but i'm getting an error i dont seem to understand, below are my code and err msg
thnks
Screenshot from 2020-07-30 10-58-09.png
Screenshot from 2020-07-30 10-59-21.png
Screenshot from 2020-07-30 10-58-55.png
Screenshot from 2020-07-30 11-26-28.png

Amitesh Sahay

unread,
Jul 30, 2020, 6:51:00 AM7/30/20
to django...@googlegroups.com
Where is your "CustomUser" defined? D you think it could be 

user = models.OneToOneField(User, ..)

Regards,
Amitesh 


On Thursday, 30 July, 2020, 03:59:59 pm IST, ola neat <tosina...@gmail.com> wrote:


good day fellaz, i'm working on extending my user model to enable user create a profile but i'm getting an error i dont seem to understand, below are my code and err msg
thnks

--
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/CAHLKn7303fjWtwatCifjxdDp78a1LfT7kW-4W1GPOboWNys6JA%40mail.gmail.com.

ola neat

unread,
Jul 30, 2020, 7:22:06 AM7/30/20
to django...@googlegroups.com
i have it defined in another app, but i've gotten it attached below 

Screenshot from 2020-07-30 12-20-00.png

Yemin Sajid

unread,
Aug 3, 2020, 5:19:27 AM8/3/20
to Django users
I think adding "user" in the fields array of the ProfileSerializer's Meta class should solve the issue.
Reply all
Reply to author
Forward
0 new messages