Custom User and Profile Model

10 vistas
Ir al primer mensaje no leído

dtdave

no leída,
28 ene 2020, 8:13:01 a.m.28/1/2020
para Django users
I have created a Custom User Model and a Profile model that is created when a user registers with the site.

I just want some confirmation that my logic is right.

To avoid the error when creating a superuser "Custom users have no profile" I have put the following in my settings.py:
AUTH_PROFILE_MODULE = 'accounts.Profile'

accounts is the name of the app and Profile is the model name.

This works fine and creates a profile in the admin for the superuser. I just need confirmation that this is the correct way to do it.

Thanks in advance
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos