A simple web application built with Flask that allows users to create, view, edit, and delete tasks. Each task includes a text description and a dynamic table with 4 columns. The application features user authentication (basic), task status tracking, search functionality, and a toggleable dark/light theme.
- Task Management: Create, view, edit, and delete tasks.
- Dynamic Table: Each task includes a table with 4 columns where rows can be added or removed dynamically during editing.
- Task Status: Track the status of tasks with 'Start', 'Ongoing', and 'Done' options.
- User Authentication: Basic login system to restrict task creation, editing, and deletion to logged-in users. Non-logged-in users can view tasks.
- Search: Search tasks by title or text description.
- Custom Sorting: 'Done' tasks are always displayed at the end of the task list.
- Theme Toggle: Switch between a dark and light theme, with the preference saved in local storage.
- SQLite Database: Persistent storage for tasks using Flask-SQLAlchemy.
- Modern UI: Improved aesthetics with a wider navbar, integrated search, and task cards on the index page.
-
Clone the repository:
git clone <repository_url> cd <repository_name>
(Replace
<repository_url>and<repository_name>with your GitHub repository details) -
Create a virtual environment (recommended):
python -m venv venv
-
Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On macOS and Linux:
source venv/bin/activate
- On Windows:
-
Install the required packages:
pip install Flask Flask-SQLAlchemy waitress
-
Initialize the database:
flask --app app init-db
This will create the
site.dbfile in your project's instance folder.
-
Make sure your virtual environment is activated.
-
Run the Flask development server:
python app.py
-
Open your web browser and go to
http://127.0.0.1:9000/.
For demonstration purposes, a hardcoded user is available:
- Username:
testuser1 - Password:
password1
Log in with these credentials to access the task creation, editing, and deletion features.
task_app/
│
├── app.py # Flask application file
├── static/
│ └── style.css # Vanilla CSS for styling and themes
└── templates/
├── base.html # Base template with navbar, theme toggle, flash messages
├── index.html # Task list page (displays tasks as cards with status)
├── create_task.html # Page to create a new task
├── view_task.html # Page to view a specific task
├── edit_task.html # Page to edit a task (includes status dropdown and dynamic table)
└── login.html # Login page
- Flask
- Flask-SQLAlchemy
- SQLite
- HTML5
- CSS3 (Vanilla CSS with CSS Variables for theming)
- JavaScript (Vanilla JS for dynamic table rows and theme toggle)
This project is licensed under the MIT License