Just wondering how difficult that switch is?
-- I know, for example, that it's best practice to atleast set AUTH_USER_MODEL to a custom user model that inherits from AbstractUser, because switching this setting afterwards is difficult, because of updating all the foreign keys, etc.
But if that is already implemented, how difficult is it to switch the user model from inheriting AbstractUser to AbstractBaseUser?
Is it simply a matter of bringing in the similar fields, methods as the normal django user, inheriting PermissionsMixin as well and likewise with the UserManager?
Or does it also involve having to manually update foreign keys or otherwise do some diving in the database?
Just wondering, because if it is that easy, then it's no problem to just inherit from AbstractUser now but I can switch to AbstractBaseUser if my project needs change. Otherwise, I'll just start with AbstractBaseUser, which doesn't seem all that bad to extend actually. I guess the danger is that, when upgrading to new django versions, have to be careful to manually reintroduce any new patches to the user code?
Thanks and sorry if the question is a bit rambling.
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/bbeb9c57-9797-4652-840a-1f81ebb56726%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment