Looking tough django auth models code, I came across this bit of code:
class User(AbstractUser):
class Meta(AbstractUser.Meta):
swappable = 'AUTH_USER_MODEL'
It's obvious that it has something to do with the new AUTH_USER_MODEL
setting in settings.py
, but how does it actually work, by what python "trick"?
And in what other situations can it be used?