diff options
| author | Mitsuo Tokumori <[email protected]> | 2023-10-27 19:56:12 -0500 |
|---|---|---|
| committer | Mitsuo Tokumori <[email protected]> | 2023-10-27 19:56:12 -0500 |
| commit | f59b3ba871f1086beb147c2de46f0cd60ce070c2 (patch) | |
| tree | d9064e0ee41d58437f42c7e7c2a636000f50e18f /README.md | |
| parent | 87e6ced8ecd0ba54af1f67319fccf96c13ba6261 (diff) | |
| download | ustayml-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.md | 33 |
1 files changed, 30 insertions, 3 deletions
@@ -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 |
