3 ms·
I'm curious why it took a few hours to swap out the base user model? Unless I'm missing something, it's fairly simple to extend the AbstractUser class with a cu
by jamestimmins 7y ago
I'm curious why it took a few hours to swap out the base user model? Unless I'm missing something, it's fairly simple to extend the AbstractUser class with a custom user model, and then assign `Settings.AUTH_USER_MODEL = 'CustomUser`.
That said, everything is easy once you know how to do it. If this was the first time you've done this or there was research involved, it definitely makes sense that it would take longer!
I'm mostly asking bc I'm curious if you came upon a level of complexity that I simply haven't encountered.
- m_ke 7y agoWe made some heavy modifications to the user model to allow for authentication with a few different types of identifiers, including composite keys. Django expects you to set a single USERNAME_FIELD but we had to support more than one and that required changes to the auth system. By default it also didn't work with UUIDs as usernames so that took a bit of time to fix.