summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorMitsuo Tokumori <[email protected]>2023-10-27 19:56:12 -0500
committerMitsuo Tokumori <[email protected]>2023-10-27 19:56:12 -0500
commitf59b3ba871f1086beb147c2de46f0cd60ce070c2 (patch)
treed9064e0ee41d58437f42c7e7c2a636000f50e18f /README.md
parent87e6ced8ecd0ba54af1f67319fccf96c13ba6261 (diff)
downloadustayml-f59b3ba871f1086beb147c2de46f0cd60ce070c2.tar.gz
ustayml-f59b3ba871f1086beb147c2de46f0cd60ce070c2.tar.bz2
ustayml-f59b3ba871f1086beb147c2de46f0cd60ce070c2.zip
Add auth view and static files
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