The docs state that three fields (app_label, model, name) uniquely identify an installed model, while only storing the last part of the model's import path in app_label. How is this possible when you can have two models with the same name in different packages which happen to share the last module name, like:
1) coke.auth.User
2) pepsi.auth.User
?
It doesn't matter: when you put 'auth'
inside INSTALLED_APPS
, only one Django app could be imported, it could be auth
from either coke
or pepsi
, or other place containing auth
, depending on their first occurring in sys.path
.
Also, in DB, the unique constraint is applied to (app_label, model)
, the name is for description.