In the process of learning Django and Python. I can\'t make sense of this.
(Example Notes:\'helloworld\' is the name of my project. It has 1 app called \'app\'.)>
from helloworld.views import * # <<-- this works
from helloworld import views # <<-- this doesn't work
from helloworld.app import views # <<-- but this works. why?
#2 and #3 are not the same.
The second one imports views from the package helloworld. The third one imports views from the package helloworld.app, which is a subpackage of helloworld. What it means is that views are specific to your django apps, and not your projects. If you had separate apps, how would you import views from each one? You have to specify the name of the app you want to import from, hence the syntax helloworld.app.