Project Set Up
1. Create a Django Project
Type the below command in terminal. (refer Fig. 1.8)
django-admin startproject TodoList

2. Navigate to Your Project.
Type the below command in terminal. (refer Fig. 1.9)
cd TodoList

3. Running Project
As far project file is created. Now run the project in local server.
Type the below command in terminal. (refer Fig. 1.10)
py manage.py runserver

4. Django Default Web Application
Now server is running. Type "http://127.0.0.1:8000" in browser. We get the default web application in browser. (refer fig. 1.11)
Type the below line in web browser. (refer Fig. 1.11)
http://127.0.0.1:8000

5. Create Django App
Django apps are components within a project. Use the following command to create an app: ( refer Fig. 1.12)
py manage.py startapp todo

6. Configure the App in Settings
Open the settings.py
file in your project directory (TodoList/settings.py
) and add your app to the INSTALLED_APPS
list:
INSTALLED_APPS = [
# ...
'todo',
]

7. Create a urls.py file in todo app folder (refer fig. 1.14)
note: just leave the urls.py file empty.

8. Register the todo app urls.py file in project urls.py (refer fig. 1.15)

Last updated