Christopher Berry
Christopher Berry

Reputation: 675

Where are Django directories created?

I installed Django 1.8.4 for Python 3.4 and whenever I type into the command prompt:

django-admin.py startproject newsite

a new window opens up in Python IDLE with the following inside of it:

#!C:\Python34\python.exe 
from django.core import management

if __name__ == "__main__":
    management.execute_from_command_line()

I know there is supposed to be a new directory with manage.py and url.py etc. inside of it but I can't find it. I opened up C:\python34\Scripts and there is no new directory.

I've also tried typing into the command prompt:

python C:\python34\Scripts\django-admin.py startproject newsite

and then nothing happens, no window or anything.

Upvotes: 1

Views: 84

Answers (1)

jonrsharpe
jonrsharpe

Reputation: 121975

Per the documentation (emphasis mine):

startproject <projectname> [destination]

django-admin startproject

Creates a Django project directory structure for the given project name in the current directory or the given destination.

By default, the new directory contains manage.py and a project package (containing a settings.py and other files). See the template source for details.

If only the project name is given, both the project directory and project package will be named <projectname> and the project directory will be created in the current working directory.

If the optional destination is provided, Django will use that existing directory as the project directory, and create manage.py and the project package within it. Use . to denote the current working directory.

For example:

django-admin startproject myproject /Users/jezdez/Code/myproject_repo

Upvotes: 1

Related Questions