Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

python

django

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.

like image 912
lux Avatar asked Dec 19 '22 16:12

lux


1 Answers

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}
like image 119
Moses Koledoye Avatar answered Dec 21 '22 10:12

Moses Koledoye