Skip to content Skip to sidebar Skip to footer

Correct Way To Extend Abstractuser In Django?

I'm trying to integrate two django apps where each had their individual auths working. To do that, I'm trying to subclass AbstractUser instead of User. I'm following the PyBB docs

Solution 1:

You can't have a one-to-one relationship with an abstract model; by definition, an abstract model is never actually instantiated.

AbstractUser is supposed to be inherited. Your structure should be:

class Student_User(AbstractUser):
    ...

Post a Comment for "Correct Way To Extend Abstractuser In Django?"