Wednesday, July 24, 2019

Re: How to access first_name ad last_name in extended User model

To pastufrazio,

I believe instead of OneToOneField, you should try using,

user = models.ForeignKey(
        settings.AUTH_USER_MODEL,
        on_delete=models.CASCADE,
    )

Since the authentication is imported.

Regards,
Kai Wey

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPcVkjhSM%3DbNXeHy1GFrQ2ra9dhSNmxixFsCS15pXFG4QgBtxA%40mail.gmail.com.

No comments:

Post a Comment