#Question about startproject
4 messages · Page 1 of 1 (latest)
$ django-admin startproject foo
$ django-admin startproject bar .
$ tree
. # current directory
├── bar # direct child as I used a .
│ ├── asgi.py
│ ├── __init__.py
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
├── foo # creates a parent
│ ├── foo # child is nested as foo/foo because no .
│ │ ├── asgi.py
│ │ ├── __init__.py
│ │ ├── settings.py
│ │ ├── urls.py
│ │ └── wsgi.py
│ └── manage.py # manage.py file for foo is nested
└── manage.py # manage.py file for bar exusts in the current dir
Basically, if you omit it, Django creates a nested directory structure... which is honestly annoying to me 😄
Generally, I will name my projects something sane, and want to create my own container directory... e.g. my-project.
$ mkdir my-project # not a valid python name because of dash
$ django-admin startproject my_project . # underscore makes it a valid name