A lightweight, robust task management application built with Python and Flask. This application allows users to create, track, edit, and delete daily tasks, leveraging a persistent SQLite database to ensure data safety.
- Task Management:
- Create: Add new tasks instantly via the dashboard.
- Read: View all scheduled tasks in a clean list format, sorted chronologically by creation date.
- Update: Edit the details of any existing task.
- Delete: Remove completed or unwanted tasks with a single click.
- Persistent Storage: Uses SQLAlchemy with SQLite to store tasks locally, so your list survives server restarts.
- Date Tracking: Automatically records the exact date and time when a task is created.
- Responsive Design: Built with a base HTML template ensuring a consistent layout across all pages.
- Backend Framework: Flask
- Database ORM: Flask-SQLAlchemy
- Database: SQLite (Default)
- Frontend: HTML5, CSS3, Jinja2 Templating engine
Here is an overview of the key files in the repository:
├── app.py # Main application entry point; defines routes and DB models
├── requirements.txt # List of python dependencies (Flask, SQLAlchemy, etc.)
├── instance/
│ └── test.db # SQLite database file storing all tasks
├── static/
│ └── main.css # Custom styling for the application
└── templates/ # HTML templates rendered by Flask
├── base.html # Base layout inherited by other templates
├── index.html # Homepage with task list and 'Add Task' form
└── update.html # Form to update existing task content
The application uses a single table named todo with the following columns:
| Column Name | Type | Description |
|---|---|---|
id | Integer | Primary Key, Unique ID for each task |
content | String | The text description of the task (Max 200 chars) |
date_created | DateTime | Timestamp of when the task was added |
Follow these instructions to get the project up and running on your local machine.
- Python 3.x installed
- pip (Python package manager)
Clone the repository:
git clone https://github.com/greatwhite9/ToDo.git cd todo-appCreate a virtual environment (Optional but Recommended):
python -m venv env # Windows .\env\Scripts\activate # Mac/Linuxsource env/bin/activate
Install dependencies:
pip install -r requirements.txt
Initialize the Database: The application automatically creates the database structure inside an
app_contextblock when run.Run the Application:
python app.py
Debug mode is enabled by default for development.
Access the App: Open your browser and navigate to
http://localhost:5000/.