Creating an app with Django
Now, we will create our first app with Django and we will analyze the directory structure that Django creates. First, go to the root folder for the virtual environment: 01
.
In Linux or macOS, enter the following command:
cd ~/HillarDjangoREST/01
If you prefer Command Prompt, run the following command in the Windows command line:
cd /d %USERPROFILE%\HillarDjangoREST\01
If you prefer Windows PowerShell, run the following command in Windows PowerShell:
cd /d $env:USERPROFILE\HillarDjangoREST\01
In Linux or macOS, run the following command to create a new Django project named restful01
. The command won't produce any output:
python bin/django-admin.py startproject restful01
In Windows, in either Command Prompt or PowerShell, run the following command to create a new Django project named restful01
. The command won't produce any output:
python Scripts\django-admin.py startproject restful01
The previous command creates a restful01
folder with other subfolders and Python files. Now...