This repository contains a basic ToDo application built using Django. The app allows users to manage tasks with basic CRUD operations.
If Python is not already installed on your system, you can download and install it from the official website: Python Downloads
It's recommended to use a virtual environment to manage dependencies for Python projects. Open a terminal and run the following commands to create and activate a virtual environment:
# Create a virtual environment
python -m venv myenv
# Activate the virtual environment
# For Windows
myenv\Scripts\activate
# For macOS/Linux
source myenv/bin/activate
With the virtual environment activated, install Django using pip:
pip install django
To initialize a new Django project, run the following command:
django-admin startproject mytodoapp
Navigate into the project directory and create a new Django app:
cd mytodoapp
django-admin startapp todo
Django uses migrations to manage database schema changes. Run the following commands to apply migrations:
cd mytodoapp
python manage.py migrate
To run the Django development server and access the ToDo app, execute the following command:
python manage.py runserver
This is a command-line utility that lets you interact with Django project. It's used for various tasks such as running the development server, creating migrations, and more
This is the project directory created by the startproject command. It contains settings for the project, including database configuration, URL configurations, and other project-specific settings
This is the app directory created by the startapp command. It contains models, views, templates, and other components related to the ToDo app
Defines the data models for the ToDo app. Models represent database tables and their relationships
Contains view functions or classes that handle requests and generate responses. Views interact with models to fetch or modify data and render templates
Defines URL patterns for the ToDo app. It maps URLs to view functions or classes
This directory contains HTML templates for the ToDo app. Templates are rendered with dynamic content using Django's template language
This directory stores database migrations created by Django. Migrations track changes to the database schema over time