With the django-admin startproject command on a virtual environment using Pipenv If you created a project, managed it with Git, and proceeded with development, I checked the directory structure because something went wrong on the way. I felt uncomfortable that Pipfile and manage.py are in different directories .... Since there are one more directory, I checked it and found a solution, so make a note.
$ django-admin startproject Arbitrary project name.
Solved by adding this last period (.)
.
$ django-admin startproject Arbitrary project name
//In the case of the following example
$ django-admin startproject sample
DirTree
sample/
├ sample/An extra directory is created here.
│ ├ sample/
│ │ ├ __init__.py
│ │ ├ settings.py
│ │ ├ urls.py
│ │ └ wsgi.py
│ └ manage.py
├ Pipfile
└ Pipfile.lock
$ django-admin startproject Arbitrary project name.
//In the case of the following example
$ django-admin startproject sample .
DirTree
sample/
├ sample/
│ ├ __init__.py
│ ├ settings.py
│ ├ urls.py
│ └ wsgi.py
├ manage.py
├ Pipfile
└ Pipfile.lock
Be careful when starting a Django project in a virtual environment using Pipenv .....
Recommended Posts