Reputation: 3698
Say I have an app called polls
.
What is the difference between including an app in INSTALLED_APPS
like this 'polls.apps.PollsConfig'
and just specifying the app's name ( 'polls'
)?
The official Django tutorial recommends the former.
Upvotes: 0
Views: 62
Reputation: 3967
The latter is the old way and it has got problems in some cases with the position in INSTALLED_APPS as the preferred way has been to put your apps the last, so all your dependencies are already available when your app is loaded.
The former is the new improved way when you load your app configuration instance first and so all the dependencies are aware of your app and also your app prior to loading has got all the dependencies available.
You should use AppConfig and put it at the top of the list, plain app positioned last is relict of the past.
Upvotes: 2