I’m starting to build a simple, minimal django project, and immediately something is off:
django-admin startproject tstAutoPK
cd tstAutoPK/
python manage.py startapp polls
but the directory and files generated are not consistent with Tutorial1:
tree .
.
├── __init__.py
├── __pycache__
│ ├── __init__.cpython-38.pyc
│ ├── settings.cpython-38.pyc
│ ├── urls.cpython-38.pyc
│ └── wsgi.cpython-38.pyc
├── asgi.py
├── db.sqlite3
├── manage.py
├── polls
│ ├── __init__.py
│ ├── admin.py
│ ├── apps.py
│ ├── migrations
│ │ └── __init__.py
│ ├── models.py
│ ├── tests.py
│ └── views.py
├── settings.py
├── tstAutoPK
├── urls.py
└── wsgi.py
According to the tutorial settings.py
, urls.py
, wsgi.py
should be placed within the tstAutoPK/tstAutoPK/
SUB-directory, but have been placed instead one level up, in tstAutoPK/
. this location seems to work (python manage.py runserver
works and provides the default page at http://127.0.0.1:8000/
).
So which is considered django-esque, the version in the tutorial or the one produced by startproject
?