User Authentication Based Django App
  • Python Django
  • Basic Python Virtual Environment Setup
  • Project Set Up
  • Model-View-Templates Implementation
  • Model & Django Admin Area
  • View
    • Types of Views in Django
    • Project Todo Views
  • Django Templates
  • Todo App
    • DEMO: Workflow of Todo App
    • Base Template for Todo App
    • Registration Module
    • Login Module
    • Linking Login and Registration page
    • Task List User Authentication
    • Task Reordering
    • Logout Module
    • Task Create Module
    • Task Update
    • Task Delete
Powered by GitBook
On this page
  • 1. Create a Django Project
  • 2. Navigate to Your Project.
  • 3. Running Project
  • 4. Django Default Web Application
  • 5. Create Django App
  • 6. Configure the App in Settings
  • 7. Create a urls.py file in todo app folder (refer fig. 1.14)
  • 8. Register the todo app urls.py file in project urls.py (refer fig. 1.15)

Project Set Up

PreviousBasic Python Virtual Environment SetupNextModel-View-Templates Implementation

Last updated 1 year ago

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)

Fig. 1.8 Django Start Project
Fig. 1.9 Change directory to TodoList Project file.
Fig. 1.10 Running project in local server.
Fig. 1.11 Default Django application.
Fig. 1.12 Create a Django App
Fig. 1.13 Configure the app in settings.
Fig. 1.14 todo urls.py
Fg. 1.15 Register app urls.py in project urls.py