{"id":25726765,"url":"https://github.com/billy-enrizky/task-manager","last_synced_at":"2026-05-12T12:07:42.560Z","repository":{"id":167044366,"uuid":"642600580","full_name":"billy-enrizky/Task-Manager","owner":"billy-enrizky","description":" I-menu Using Flask","archived":false,"fork":false,"pushed_at":"2023-10-14T20:51:25.000Z","size":5516,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-25T23:18:57.666Z","etag":null,"topics":["flask"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/billy-enrizky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-05-19T00:10:53.000Z","updated_at":"2024-04-20T15:09:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"1b884fa5-5709-4637-9026-90a929924ab8","html_url":"https://github.com/billy-enrizky/Task-Manager","commit_stats":null,"previous_names":["billy-enrizky/flask_proj"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/billy-enrizky/Task-Manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billy-enrizky%2FTask-Manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billy-enrizky%2FTask-Manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billy-enrizky%2FTask-Manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billy-enrizky%2FTask-Manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/billy-enrizky","download_url":"https://codeload.github.com/billy-enrizky/Task-Manager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billy-enrizky%2FTask-Manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32938078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T09:19:52.626Z","status":"ssl_error","status_checked_at":"2026-05-12T09:17:33.438Z","response_time":102,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask"],"created_at":"2025-02-25T23:18:46.411Z","updated_at":"2026-05-12T12:07:42.539Z","avatar_url":"https://github.com/billy-enrizky.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Create Task Manager Using Flask\n\nThis is a guide on how to create a Task Manager web application using Flask, a Python web framework. The Task Manager allows users to add, edit, and delete tasks with a title and description.\n\n## Prerequisites\n\nBefore getting started, make sure you have the following installed:\n\n- Python (version 3.6 or later)\n- Flask (install using `pip install flask`)\n\n## Project Setup\n\n1. Create a new directory for your project and navigate to it.\n2. Initialize a new virtual environment:\n   ```shell\n   python -m venv venv\n   ```\n3. Activate the virtual environment:\n   - On Windows:\n     ```shell\n     venv\\Scripts\\activate\n     ```\n   - On macOS/Linux:\n     ```shell\n     source venv/bin/activate\n     ```\n4. Create a new Python file called `app.py` for our Flask application.\n\n## Setting Up the Flask Application\n\n1. Open `app.py` and import the necessary modules:\n   ```python\n   from flask import Flask, render_template, request, redirect, url_for\n   from datetime import datetime\n   ```\n2. Create an instance of the Flask application:\n   ```python\n   app = Flask(__name__)\n   ```\n3. Define a route for the home page:\n   ```python\n   @app.route('/')\n   def index():\n       return render_template('index.html')\n   ```\n4. Add a route to handle the form submission for adding a new task:\n   ```python\n   @app.route('/add', methods=['POST'])\n   def add_task():\n       title = request.form['title']\n       desc = request.form['desc']\n       date = datetime.now().strftime(\"%Y-%m-%d %H:%M:%S\")\n       # TODO: Save the task to a database or any other storage\n       return redirect(url_for('index'))\n   ```\n5. Add a route to render the form for adding a new task:\n   ```python\n   @app.route('/add')\n   def show_add_form():\n       return render_template('add.html')\n   ```\n6. Add a route to handle the form submission for editing a task:\n   ```python\n   @app.route('/edit/\u003cint:task_id\u003e', methods=['POST'])\n   def edit_task(task_id):\n       title = request.form['title']\n       desc = request.form['desc']\n       # TODO: Update the task with the given task_id in the database or storage\n       return redirect(url_for('index'))\n   ```\n7. Add a route to render the form for editing a task:\n   ```python\n   @app.route('/edit/\u003cint:task_id\u003e')\n   def show_edit_form(task_id):\n       # TODO: Retrieve the task with the given task_id from the database or storage\n       # Pass the task data to the template\n       return render_template('edit.html', task=task)\n   ```\n8. Add a route to handle deleting a task:\n   ```python\n   @app.route('/delete/\u003cint:task_id\u003e')\n   def delete_task(task_id):\n       # TODO: Delete the task with the given task_id from the database or storage\n       return redirect(url_for('index'))\n   ```\n9. Run the Flask application:\n   ```shell\n   flask run\n   ```\n\n## HTML Templates\n\nCreate the following HTML templates in a new directory called `templates`:\n\n1. `index.html`:\n   ```html\n   {% extends \"base.html\" %}\n\n   {% block main %}\n     \u003c!-- Display the tasks here --\u003e\n   {% endblock %}\n   ```\n\n2. `add.html`:\n   ```html\n   {% extends \"base.html\" %}\n\n   {% block main %}\n     \u003ch2\u003eAdd Task\n\n\u003c/h2\u003e\n     \u003cform action=\"{{ url_for('add_task') }}\" method=\"POST\"\u003e\n       \u003clabel for=\"title\"\u003eTitle:\u003c/label\u003e\n       \u003cinput type=\"text\" id=\"title\" name=\"title\" required\u003e\u003cbr\u003e\u003cbr\u003e\n       \u003clabel for=\"desc\"\u003eDescription:\u003c/label\u003e\n       \u003ctextarea id=\"desc\" name=\"desc\" required\u003e\u003c/textarea\u003e\u003cbr\u003e\u003cbr\u003e\n       \u003cinput type=\"submit\" value=\"Add Task\"\u003e\n     \u003c/form\u003e\n   {% endblock %}\n   ```\n\n3. `edit.html`:\n   ```html\n   {% extends \"base.html\" %}\n\n   {% block main %}\n     \u003ch2\u003eEdit Task\u003c/h2\u003e\n     \u003cform action=\"{{ url_for('edit_task', task_id=task.id) }}\" method=\"POST\"\u003e\n       \u003clabel for=\"title\"\u003eTitle:\u003c/label\u003e\n       \u003cinput type=\"text\" id=\"title\" name=\"title\" value=\"{{ task.title }}\" required\u003e\u003cbr\u003e\u003cbr\u003e\n       \u003clabel for=\"desc\"\u003eDescription:\u003c/label\u003e\n       \u003ctextarea id=\"desc\" name=\"desc\" required\u003e{{ task.desc }}\u003c/textarea\u003e\u003cbr\u003e\u003cbr\u003e\n       \u003cinput type=\"submit\" value=\"Update Task\"\u003e\n     \u003c/form\u003e\n   {% endblock %}\n   ```\n\n4. `base.html`:\n   ```html\n   \u003c!doctype html\u003e\n   \u003chtml lang=\"en\"\u003e\n     \u003chead\u003e\n       \u003c!-- Required meta tags --\u003e\n       \u003cmeta charset=\"utf-8\"\u003e\n       \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\"\u003e\n\n       \u003c!-- Bootstrap CSS --\u003e\n       \u003clink rel=\"stylesheet\" href=\"https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css\"\u003e\n\n       \u003ctitle\u003eTask Manager\u003c/title\u003e\n     \u003c/head\u003e\n     \u003cbody\u003e\n       \u003cdiv class=\"container-fluid\"\u003e\n         \u003cnav class=\"navbar navbar-expand-lg navbar-light bg-light\"\u003e\n           \u003cul class=\"navbar-nav\"\u003e\n             \u003cli class=\"nav-item\"\u003e\u003ca href=\"{{ url_for('index') }}\" class=\"nav-link\"\u003eTasks\u003c/a\u003e\u003c/li\u003e\n             \u003cli class=\"nav-item\"\u003e\u003ca href=\"{{ url_for('show_add_form') }}\" class=\"nav-link\"\u003eAdd New\u003c/a\u003e\u003c/li\u003e\n           \u003c/ul\u003e\n         \u003c/nav\u003e\n         \u003cbr\u003e\n         {% with messages = get_flashed_messages() %}\n           {% if messages %}\n             {% for message in messages %}\n             \u003cdiv class=\"alert alert-primary\"\u003e\n               {{ message }}\n             \u003c/div\u003e\n             {% endfor %}\n           {% endif %}\n         {% endwith %}\n         \u003cbr\u003e\n         \u003ch1\u003eTask Manager\u003c/h1\u003e\n         \u003cbr\u003e\n         {% block main %}{% endblock %}\n       \u003c/div\u003e\n\n       \u003c!-- Additional scripts --\u003e\n       \u003cscript src=\"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js\"\u003e\u003c/script\u003e\n       \u003cscript src=\"https://cdnjs.cloudflare.com/ajax/libs/bootstrap/4.5.0/js/bootstrap.min.js\"\u003e\u003c/script\u003e\n     \u003c/body\u003e\n   \u003c/html\u003e\n   ```\n\n## Conclusion\n\nCongratulations! You have created a Task Manager web application using Flask. The application allows users to add, edit, and delete tasks. You can further enhance the application by connecting it to a database, implementing authentication, and adding additional features as per your requirements.\n\nRemember to always follow best practices for web development, including validating user input, securing sensitive data, and properly handling errors. Enjoy building more features on top of this foundation!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbilly-enrizky%2Ftask-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbilly-enrizky%2Ftask-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbilly-enrizky%2Ftask-manager/lists"}