summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md33
1 files changed, 30 insertions, 3 deletions
diff --git a/README.md b/README.md
index 6433ba2..77aa31e 100644
--- a/README.md
+++ b/README.md
@@ -14,8 +14,9 @@ flask --app flaskr run --debug
## Learning resources
-* https://flask.palletsprojects.com/en/3.0.x/#user-s-guide
-* https://sqlite.org/lang.html
+* Flask: https://flask.palletsprojects.com/en/3.0.x/#user-s-guide
+* DB: https://sqlite.org/lang.html
+* Template: https://jinja.palletsprojects.com/templates/
Concepts:
@@ -29,7 +30,33 @@ Concepts:
* flask.session: dict that stores data across requests (cookies) (securely
signed with SECRET_KEY)
* *endpoint*: name associated with a view, `<blueprint_name>.<view_function_name>`
+* Templates: Used to render HTML. Uses Jinja template library. Autoscapes any
+ data that is rendered in HTML templates, so it's safe to render user input.
+ * `{{ }}` denotes expressions (output) (similar to python)
+ * `{% %}` denotes control flow statements (similar to pseudo-code)
+ * Automatically available: `g`, `url_for`, and more
+ * In base.html you define "blocks" placeholder which are later defined in
+ other templates that extend base.html
Gotchas:
-* Remember to call db.commit() after modifying DB (DML). \ No newline at end of file
+* Remember to call db.commit() after modifying DB (DML).
+
+Browser warnings and errors:
+
+* https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value
+
+## Discussion
+
+Pros:
+
+* Flask is AWESOME, it's simple, it's elegant, it's enjoyable to code with.
+ Following the tutorial provides you all the basic tools to begin creating
+ projects with flask.
+* It's secure, provides you with cryptographic signature for cookies and escapes
+ HTML transparently to the developer.
+
+Cons:
+
+* Maybe scalability and performance is lower compared to PHP or Javascript
+ web applications. \ No newline at end of file