# startproject doesn't put settings.py in subdirectory?!

**URL:** <https://forum.djangoproject.com/t/startproject-doesnt-put-settings-py-in-subdirectory/8037>\
**Category:** Using Django\
**Created:** [May 23, 2021, 8:09pm UTC](https://forum.djangoproject.com/t/startproject-doesnt-put-settings-py-in-subdirectory/8037 "2021-05-23T20:09:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rbelew](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/rbelew/32/4589_2.png) [@rbelew](https://forum.djangoproject.com/u/rbelew)\
**Post date:** [May 23, 2021, 8:09pm UTC](https://forum.djangoproject.com/t/startproject-doesnt-put-settings-py-in-subdirectory/8037/1 "2021-05-23T20:09:13Z")

</div>

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](https://docs.djangoproject.com/en/3.2/intro/tutorial01/):

```
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`?

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [May 23, 2021, 9:00pm UTC](https://forum.djangoproject.com/t/startproject-doesnt-put-settings-py-in-subdirectory/8037/2 "2021-05-23T21:00:37Z")

</div>

You should already be in your “outer” tstAutoPK when you run startproject and startapp. You don’t cd into the “inner” tstAutoPK directory when running startapp. This will create the structure as described in the tutorial.

---

<div class="post-metadata">

**Author:** ![rbelew](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/rbelew/32/4589_2.png) [@rbelew](https://forum.djangoproject.com/u/rbelew)\
**Post date:** [May 23, 2021, 9:11pm UTC](https://forum.djangoproject.com/t/startproject-doesnt-put-settings-py-in-subdirectory/8037/3 "2021-05-23T21:11:35Z")

</div>

Wow, i’ve labored under that misconception for awhile. thanks Ken!
