![Screenshot 2023-08-27 at 11 35 19 AM](https://private-user-images.githubusercontent.com/129988927/263542914-eefeb4d4-9b6d-433b-be9b-dac86573d4ea.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MTA3NjYsIm5iZiI6MTcyNDcxMDQ2NiwicGF0aCI6Ii8xMjk5ODg5MjcvMjYzNTQyOTE0LWVlZmViNGQ0LTliNmQtNDMzYi1iZTliLWRhYzg2NTczZDRlYS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyNlQyMjE0MjZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xMzZiZGMxNWQ3ZTZkZTQ5YjAxYWIzYzQ2YzY1YmJhOTYxNWVjMWMzOWE4ODczYzc4NmEwMjUwODViZGUxNGM2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.s3rm6yRGKsWFBA29HCHoSkBx4nrhICjyNqvehmClDUo)
This repository contains a simple web application built using Flask, a micro web framework for Python. The application serves as a task management system where users can create, view, and mark tasks as complete.
To run the application, follow these steps:
-
Install the required dependencies by running the following command in your terminal:
pip install Flask Flask-Bootstrap
-
Clone this repository to your local machine:
git clone [<repository_url>](https://github.com/0xJeu/To-Do-List.git)
-
Navigate to the repository directory:
cd [<repository_directory>](https://github.com/0xJeu/To-Do-List.git)
-
Run the application by executing the following command:
python app.py
-
Open your web browser and go to
http://localhost:5000
to access the application.
-
Task Creation: Users can create new tasks by providing a title and description. Optionally, a task can be marked as completed during creation.
-
Task Listing: All existing tasks are displayed on the main page in a list format. Each task shows its title, description, and completion status.
-
Mark as Complete: Users can mark a task as complete by sending a PUT request to the
/tasks/<task_id>
endpoint.
-
GET /tasks
: Retrieve the list of tasks in JSON format. -
POST /tasks
: Create a new task. Requires a JSON payload withtitle
anddescription
fields. Optionally, you can include acompleted
field to specify the completion status. -
PUT /tasks/<task_id>
: Mark a task as complete. Requires thetask_id
as part of the URL.
The code consists of the following components:
-
app.py
: The main application file. It sets up the Flask app, defines the routes, and contains the logic for managing tasks. -
templates/index.html
: The HTML template used to render the main page. It displays the list of tasks and provides a simple user interface. -
Task
Class: A class representing a task object. It includes attributes liketask_id
,title
,description
, andcompleted
.
Contributions to this project are welcome! If you find any issues or want to add new features, feel free to create a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.
Note: This README provides a general overview of the application and its functionality. For detailed instructions on using specific API endpoints and interacting with the application, refer to the API documentation or inline comments in the source code.