[PYTHON] A story when a directory is buggy with the django-admin start project command in a virtual environment using Pipenv

Overview

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.

Conclusion

$ django-admin startproject Arbitrary project name.

Solved by adding this last period (.).

Failure pattern

$ 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

Success pattern

$ 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

A story when a directory is buggy with the django-admin start project command in a virtual environment using Pipenv
Start Django in a virtual environment with Pipenv
Debug settings in virtual environment when using Pipenv with VS Code
Create a Django project and application in a Python virtual environment and start the server
A story that stumbled when using pip in a proxy environment
The story that a hash error came out when using Pipenv
Install Django in a pipenv virtual environment
Replace the directory name and the file name in the directory together with a Linux command.
When you make a mistake in the directory where you execute `pipenv install`
Notify using Notification Center when the execution environment is macOS in Python
Create a virtual environment with conda in Python
Error when entering virtual environment with workon command
Work in a virtual environment with Python virtualenv.
When a local variable with the same name as a global variable is defined in the function
Command line collection for using virtual environment in Anaconda
A story about PHP that was okay in the development environment but buggy in the production environment LEVEL 1-3 + 1
When reading an image with SimpleITK, there is a problem if there is Japanese in the path
About the matter that nosetests does not pass when __init__.py is created in the project directory
Create a test with the auxiliary tool [selenium katalon recorder], which is convenient when using selenium.
How to deal with the terminal getting into the pipenv environment without permission when using pipenv with vscode
[RHEL7 / CentOS7] LWP execution error in the environment where Perl is installed with the yum command
Try running python in a Django environment created with pipenv
When the variable name conflicts with the Devaga command in pdb
I want to start a jupyter environment with one command
Reflect the virtual environment created with Miniconda in Jupyter notebook
When I start service with systemd, I get command not found even though the path is passing
Prevent unnecessary directories from being created under the current directory when you start project with Django
A story that didn't work when I tried to log in with the Python requests module
It is good to create an environment with runtime error => venv when using pyplot backends of macosx on a virtual environment created with virtualenv.
When I start the virtual environment of conda, the prompt of bash collapses
[Understanding in the figure] Management of Python virtual environment by Pipenv
PATH when using ANACONDA virtual environment with Pycharm (as of Mac 2020/10/03)
[Windows + anaconda] Automatically activate the environment when the command prompt is started
Create a virtual environment with Python!
Building a virtual environment with Python 3
Using cgo with the go command
Prepare a Python virtual environment for your project with venv with VS Code
The story of a Parking Sensor in 10 minutes with GrovePi + Starter Kit
Create a record with attachments in KINTONE using the Python requests module
What to do when the warning "The environment is in consistent ..." appears in the Anaconda environment
A useful note when using Python for the first time in a while