When creating a Django project, change the current directory directly to a Django project

1. Background

use command

django-admin startproject myplatform

When creating a project, a new project will be created under the current directory.

As a result, our outermost folder is redundant.

The function I want to achieve is to directly change the current directory into a Django project when creating a Django project.

Second, the solution:

When creating a Django project, specify the path.

. The dot represents the current path.

django-admin startproject project-name .

The project name is generally consistent with the path name

django-admin startproject myplatform .

Supongo que te gusta

Origin blog.csdn.net/qq_39208536/article/details/130148067
Recomendado
Clasificación