Friday, February 18, 2022

[SOLVED] Django version 2.1 Django-admin.py startproject only creates manage.py

Issue

I'm using anaconda on Windows 10 with python version 3.6.5. These are the commands that I ran on Django 2.1.0:

pip install virtualenvwrapper.win
mkvirtualenv firstBlog
workon firstBlog
pip install Django
Django-admin.py startproject firstBlog
cd firstBlog
dir

and this is the output I get:

08/22/2018  02:48 PM    <DIR>          .
08/22/2018  02:48 PM    <DIR>          ..
08/22/2018  02:48 PM    <DIR>          firstBlog
08/22/2018  02:48 PM               556 manage.py
               1 File(s)            556 bytes
               3 Dir(s)  137,288,876,032 bytes free

Why did startproject not make init.py, urls.py and settings.py?

I should add that I'm trying to make a website that someone can draw numbers with their mouse onto a 28x28 grid and then have a neural network recognize the number they drew on the website. It's a passion project of mine.


Solution

On Windows, you need to point it at the file path of django-admin.py directly. For example: C:\Users\filip\Python\ENV\Scripts\django-admin.py

After that, you've started a project, which can have any number of apps.

You next need to create an app:

manage.py startapp my-app-name

This will create the project directory structure.

Have a look at the docs here manage and django-admin



Answered By - Athena
Answer Checked By - Cary Denson (WPSolving Admin)