pythondjango

manage.py not generated when using "django-admin startapp mysite"


I'm trying to setup a webapp using the django framework. Following the tutorial, when I use "django-admin startapp {project-name}", django-admin correctly generates:

06/08/2016  10:21 AM    <DIR>          .
06/08/2016  10:21 AM    <DIR>          ..

06/08/2016  10:21 AM                63 admin.py
06/08/2016  10:21 AM                97 apps.py
06/08/2016  10:21 AM    <DIR>          migrations
06/08/2016  10:21 AM                57 models.py
06/08/2016  10:21 AM                60 tests.py
06/08/2016  10:21 AM                63 views.py
06/08/2016  10:21 AM                 0 __init__.py
               6 File(s)            340 bytes
               3 Dir(s)  91,039,383,552 bytes free

But not manage.py.

I can't seem to figure out what I'm doing wrong. I am working in a virtual environment (which I didn't last time it worked) with just django installed if that makes a difference.

Edit: I just tested creating an app outside the virtual environment and the same problem was prominent - no manage.py.

I use django 1.9.7, and it seems like I used django 1.8.x when it worked last.


Solution

  • manage.py is included in projects not apps. To create a new project, you should do:

    django-admin startproject {project-name}
    

    Projects are a collection of apps. So to create an app, cd into the project directory you've just created and do:

    django-admin startapp {app-name}