django-adminpython-2.7django-1.3

django-admin.py startapp myproject does not create settings.py


I have Python2.7 and Django 1.3.1, running on windows 7 32bit

When I type 'python django-admin.py startapp myproject', the folder that is created looks like:

mysite/ init.py models.py tests.py views.py

instead of

mysite/ init.py manage.py settings.py urls.py

Now the reason I have to type in 'python django-admin.py startapp myproject' instead of just 'django-admin.py startapp myproject' is because .py files are not properly associated with python, a solution was suggested in this thread: django-admin.py is not working properly

I tried it but I could get the proper association for some reason. I also made sure django-admin.py should be opened with python.exe file through Properties. Finally both django-admin.py and python.exe are added to system path as configured in Computer ->properties>advanced->environmental variables.

So a bit out of ideas here...


Solution

  • You want startproject instead of startapp.

    Check out the docs at https://docs.djangoproject.com/en/dev/ref/django-admin/#startproject-projectname-destination