Reputation: 41
I'm somewhat a beginner with Django and I'm wondering why people link up apps in settings.py in INSTALLED_APPS in 2 different ways. One is just the name of the application and the other one 'appname.apps.AppnameConfig'
.
What is the difference between the two ways?
Upvotes: 1
Views: 37
Reputation: 13140
Traditionally, items listed in settings.INSTALLED_APPS
are Python packages. Generally if you install a third party package, it's imported more or less directly. For example, if I make a my_django_addon
package, I would include it as such, after bundling it as a Python package and installing it with easy_install
, pip
, etc.
An alternative is to point not to the package itself, but to a Django appconfig. This newer approach doesn't point directly to the Python package itself, but rather, a configuration object with some extra metadata.
Upvotes: 1