[Answered ]-Django model reference when using AbstractBaseUser model

1πŸ‘

βœ…

In Python if you define a class like that

class ClassName(SuperClassName):
  ...

You are extending one or more existing classes. This is inheritance, not a reference.

If you want a reference you might want something like this:

class AddressBook(models.Model):
  user = models.ForeignKey('MyUser', on_delete=models.CASCADE)
  ...

For more detailed information I recommend looking at this page in the documentation.

πŸ‘€SvenTUM

Leave a comment