Wizard
Wizard

Reputation: 22093

dot in `django-admin.py startproject myproject .`

I keep the question in mind when read through Django source codes for weeks.

Start project with Django,

django-admin.py startproject myproject . # a tailed dot in the end

manage.py will be created outside the project folder.

if without '.',

manage.py will be included in project folders.

How does the '.' work?

Upvotes: 7

Views: 3423

Answers (2)

wd40
wd40

Reputation: 1

For django 4.1.3 (not sure if there was a difference in earlier versions):

With dot - it creates manage.py outside the project directory, in the current directory from where the command has been executed from. Without dot - it creates manage.py inside the project directory

Upvotes: 0

Ammar Alyousfi
Ammar Alyousfi

Reputation: 4372

The dot means: Create the project directly in the current directory, without creating a folder for it

Upvotes: 17

Related Questions