When including an app’s URL’s in the project’s urls.py, my coding partner does it this way:
('^stops/', include('stops.urls'))
However, Django documentation specifies the following syntax:
('^clients/', include('project_name.app_name.urls'))
His way has worked. Is there a reason to specify the project name at all?
It depends on your
PYTHONPATHsetting and the structure of your projects and apps.We have many, many projects. Each with several apps. All are on our
PYTHONPATH, so the project name is essential.If you have only one project, and the top-level project directory is on your
PYTHONPATH, then each app can be resolved separately and you can’t use the project name.