diff --git a/README.md b/README.md
index d2106f5..cac63b9 100644
--- a/README.md
+++ b/README.md
@@ -6,6 +6,10 @@
- `prettier`: Formatter
+### Frontend Technical Write-up
+
+Inside the `backend\` folder
+
## Backend
### Development workflow
@@ -42,26 +46,4 @@
### Backend Technical Write-up
-#### Quart specific terminologies
-
-`blueprint`: a collection of route handlers/API functionalities.
-
-#### API route trailing slashes
-
-API paths should end with a slash i.e: `/sessions/` rather than `/session`.
-This is because requests sent to `/sessions` will be redirected to `/sessions/` whereas `/sessions/` won't get redirected.
-
-#### Difference between database schema and database model
-
-- A schema defines the structure of data within the database.
-- A model is a class that can be represented as rows in the database, i.e ID row, age row as class member.
-
-#### Managing user's sessions (Authentication)
-
-- Login should results in a cookie being set in the user's browser, which is being sent in every subsequent request.
- The presence and value of this cookie are used to determine whether the member is logged in, and which member made the request.
-- Logout results in the cookie being deleted.
-
-#### Idempotent routes
-
-Idempotence is a property of a route where the final state is achieved no matter how many times the route is called, that is, calling the route once or 10 times has the same effect. This is a useful property as it means the route can be safely retried if the request fails. For RESTful and HTTP APIs, the routes using GET, PUT, and DELETE verbs are expected to be idempotent.
+Inside the `backend\` folder
diff --git a/backend/README.md b/backend/README.md
new file mode 100644
index 0000000..f18dfff
--- /dev/null
+++ b/backend/README.md
@@ -0,0 +1,27 @@
+# Backend Technical Write Up
+
+## General Bits of Information
+
+### Quart specific terminologies
+
+`blueprint`: a collection of route handlers/API functionalities.
+
+### API route trailing slashes
+
+API paths should end with a slash i.e: `/sessions/` rather than `/session`.
+This is because requests sent to `/sessions` will be redirected to `/sessions/` whereas `/sessions/` won't get redirected.
+
+### Difference between database schema and database model
+
+- A schema defines the structure of data within the database.
+- A model is a class that can be represented as rows in the database, i.e ID row, age row as class member.
+
+### Managing user's sessions (Authentication)
+
+- Login should results in a cookie being set in the user's browser, which is being sent in every subsequent request.
+ The presence and value of this cookie are used to determine whether the member is logged in, and which member made the request.
+- Logout results in the cookie being deleted.
+
+### Idempotent routes
+
+Idempotence is a property of a route where the final state is achieved no matter how many times the route is called, that is, calling the route once or 10 times has the same effect. This is a useful property as it means the route can be safely retried if the request fails. For RESTful and HTTP APIs, the routes using GET, PUT, and DELETE verbs are expected to be idempotent.
diff --git a/backend/pyproject.toml b/backend/pyproject.toml
index 87ebd74..f4969d3 100644
--- a/backend/pyproject.toml
+++ b/backend/pyproject.toml
@@ -3,7 +3,7 @@ name = "Todo_api"
version = ""
description = ""
authors = [
- {name = "Minh Tran Nhat", email = "minhtrannhat@minhtrannhat.com"},
+ {name = "Minh Tran Nhat", email = "minh@minhtrannhat.com"},
]
requires-python = ">=3.10"
license = {text = "Private"}
@@ -58,7 +58,7 @@ ignore_missing_imports = true
[tool.pdm.scripts]
format-black = "black src/ tests/"
-format-djhtml = "djhtml src/backend/templates -t 2 --in-place"
+format-djhtml = "djhtml src/backend/templates -t 2"
format-isort = "isort src tests"
format = {composite = ["format-black", "format-djhtml", "format-isort"]}
diff --git a/backend/src/backend/models/todo.py b/backend/src/backend/models/todo.py
index 6d3c670..cd72161 100644
--- a/backend/src/backend/models/todo.py
+++ b/backend/src/backend/models/todo.py
@@ -29,7 +29,7 @@ async def select_todos(
WHERE member_id = :member_id
AND complete = :complete"""
values = {"member_id": member_id, "complete": complete}
- return [Todo(**row) async for row in await connection.iterate(query, values)]
+ return [Todo(**row) async for row in connection.iterate(query, values)]
async def select_todo(
diff --git a/backend/src/backend/run.py b/backend/src/backend/run.py
index 96e8340..60a4960 100644
--- a/backend/src/backend/run.py
+++ b/backend/src/backend/run.py
@@ -115,6 +115,7 @@ def recreate_db() -> None:
"-U",
"postgres",
"-c",
- f"ALTER DATABASE {db_url.path.removeprefix('/')} OWNER TO {db_url.username}",
+ f"ALTER DATABASE \
+ {db_url.path.removeprefix('/')} OWNER TO {db_url.username}",
]
)
diff --git a/backend/src/backend/templates/email.html b/backend/src/backend/templates/email.html
index b6427b1..4ca58ab 100644
--- a/backend/src/backend/templates/email.html
+++ b/backend/src/backend/templates/email.html
@@ -1,39 +1,39 @@
-
- Todo - email
-
-
-
+
+ Todo - email
+
+
+
-
-
-
-
-
-
-
- {% block welcome %} Hello, {% endblock %}
- |
-
-
-
- {% block content %} Example content {% endblock %}
- |
-
-
- The Todo team |
-
-
- |
-
-
-
+
+
+
+
+
+
+
+ {% block welcome %} Hello, {% endblock %}
+ |
+
+
+
+ {% block content %} Example content {% endblock %}
+ |
+
+
+ The Todo team |
+
+
+ |
+
+
+