Reputation: 147
I just started learning Django and I watch 2 different courses on Youtube. And adding apps to a project got me confused right from the start. In the first tutorial they tell me to add an app to a list of installed apps like this:
INSTALLED_APPS = [
'blog.apps.BlogConfig',
...
...
...
]
and in the other tutorial they simply add the app name to the list:
INSTALLED_APPS = [
'blog',
...
...
...
]
Could you please explain me the difference? And how should I add apps to the project?
Upvotes: 3
Views: 630
Reputation: 5740
You add the app’s configuration class (subclassed from AppConfig) if you want to configure certain properties of the app (e.g. the label it's identified by in the Admin interface).
The documentation has an Application configuration section that deals with that.
Upvotes: 3