confusion in models in django

26 views
Skip to first unread message

Mukul Agrawal

unread,
Dec 19, 2017, 1:26:23 AM12/19/17
to Django users
I am a bit confused that is it necessary to write the name of the app in the INSTALLED_APPS in settings.py. Because whether I write it or not, I am able to successfully run my project. Then what is the difference between the two method.

Matemática A3K

unread,
Dec 19, 2017, 1:59:18 AM12/19/17
to django...@googlegroups.com
By registering an app you take full advantage of the framework:
https://docs.djangoproject.com/en/2.0/ref/applications/#application-registry

You can import "things" (modules, functions, etc.) from any python module in the path, that's why you are able to import any python code from your project directory, despite of not being registered as an app. That's a regular python import, like "import os", it does not correspond to the Django.

HTH

On Tue, Dec 19, 2017 at 3:26 AM, Mukul Agrawal <amuk...@gmail.com> wrote:
I am a bit confused that is it necessary to write the name of the app in the INSTALLED_APPS in settings.py. Because whether I write it or not, I am able to successfully run my project. Then what is the difference between the two method.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f869b60a-76cf-4a95-b2f0-9c854f79101b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

IL Ka

unread,
Dec 19, 2017, 6:04:00 AM12/19/17
to Django users
Apps not listed in INSTALLED_APPS will not participate in many important steps including migrations ("makemigrations" / 'migrate") so your models will not be created in database
Reply all
Reply to author
Forward
0 new messages