viveksantayana
c7252d0f7b
Refactored to move security package inside common Moved data folder to process root.
83 lines
4.0 KiB
Markdown
83 lines
4.0 KiB
Markdown
# References for Learning Flask, etc
|
|
|
|
## Documentation
|
|
|
|
### Docker/Docker-Compose
|
|
|
|
- [Docker Compose Reference](https://docs.docker.com/compose/compose-file/compose-file-v3/)
|
|
|
|
### MongoDB/PyMongo
|
|
|
|
- [MongoDB Shell Commands](https://docs.mongodb.com/manual/reference/)
|
|
- [PyMongo Driver](https://pymongo.readthedocs.io/en/stable/)
|
|
|
|
## Source Code
|
|
|
|
- [MongoDB Docker Image entrypoint shell script](https://github.com/docker-library/mongo/blob/master/5.0/docker-entrypoint.sh) (Context: Tried to replicate the command to create a new user in the original entrypoint script in the custom initialisation script in this app.)
|
|
|
|
## Guides
|
|
|
|
### Flask General
|
|
|
|
- [How to structure Flask Projects](https://www.digitalocean.com/community/tutorials/how-to-structure-large-flask-applications)
|
|
- [Tables](https://www.blog.pythonlibrary.org/2017/12/14/flask-101-adding-editing-and-displaying-data/)
|
|
- [Tables, but interactive](https://blog.miguelgrinberg.com/post/beautiful-interactive-tables-for-your-flask-templates)
|
|
|
|
## Stack Exchange/Overflow
|
|
|
|
### MongoDB
|
|
|
|
- [Creating MongoDB Database on Container Start](https://stackoverflow.com/questions/42912755/how-to-create-a-db-for-mongodb-container-on-start-up)
|
|
- [Passing Environment Variables to Docker Container Entrypoint](https://stackoverflow.com/questions/64606674/how-can-i-pass-environment-variables-to-mongo-docker-entrypoint-initdb-d)
|
|
- [Integrating Flask-Login with MongoDB](https://stackoverflow.com/questions/54992412/flask-login-usermixin-class-with-a-mongodb) (**This does not work with the app as is, and is possibly something that needs more research and development in the future**)
|
|
- [Setting up a Postfix email notification system](https://medium.com/@vietgoeswest/a-simple-outbound-email-service-for-your-app-in-15-minutes-cc4da70a2af7)
|
|
|
|
## YouTube Tutorials
|
|
|
|
### General Flask Introduction
|
|
|
|
- [Part 1: Basics](https://www.youtube.com/watch?v=mqhxxeeTbu0)
|
|
- [Part 2: HTML Templates](https://www.youtube.com/watch?v=xIgPMguqyws)
|
|
- [Part 3: Bootstrap and Jinja](https://www.youtube.com/watch?v=4nzI4RKwb5I)
|
|
- [Part 4: HTTP Methods and Data Handling](https://www.youtube.com/watch?v=9MHYHgh4jYc)
|
|
- [Part 5: Sessions](https://www.youtube.com/watch?v=iIhAfX4iek0)
|
|
- [Part 6: Flashing Alerts](https://www.youtube.com/watch?v=qbnqNWXf_tU)
|
|
- [Part 9: Static Files](https://www.youtube.com/watch?v=tXpFERibRaU)
|
|
- [Part 10: Blueprints and Sub-Files](https://www.youtube.com/watch?v=WteIH6J9v64)
|
|
- [All in One with some more precise methods and techniques](https://www.youtube.com/watch?v=GW_2O9CrnSU)
|
|
|
|
Note: These tutorials use an outdated version of Bootstrap where some of the elements no longer apply.
|
|
|
|
### Build a User Log-In System using Python and MongoDB
|
|
|
|
- [Part 1](https://www.youtube.com/watch?v=w1STSSumoVk)
|
|
- [Part 2](https://www.youtube.com/watch?v=mISFEwojJmE)
|
|
- [Part 3](https://www.youtube.com/watch?v=tIoiR3N34i8)
|
|
- [Part 4](https://www.youtube.com/watch?v=5oC4-j3WWIk)
|
|
|
|
This method uses a basic HTML form and handles log-ins manually (rather than `flask-login` or `flask-auth`).
|
|
It uses `sessions` to handle user interactions (rather than cookies).
|
|
A better method would be to layer this with other Flask modules, such as `flask-login`, `flask-auth`, `flask-wtforms`, etc.
|
|
This tutorial is nevertheless really useful for integrating with **MongoDB**.
|
|
|
|
### Creating a User Login Session using Python, Flask, and MongoDB
|
|
|
|
- [Tutorial](https://www.youtube.com/watch?v=vVx1737auSE)
|
|
|
|
A much simpler and more rudimentary introduction to Flask and MongoDB.
|
|
|
|
### `flask-login`
|
|
|
|
- [Intro to `flask-login`](https://www.youtube.com/watch?v=2dEM-s3mRLE)
|
|
- [Build a User Login System with `flask-login`, `flask-wtforms`, `flask-bootstrap`, and `flask-sqlalchemy`](https://www.youtube.com/watch?v=8aTnmsDMldY)
|
|
|
|
A much more robust method that uses the various Flask modules to make a more powerful framework.
|
|
Uses SQL rather than MongoDB.
|
|
|
|
### Flask techniques
|
|
|
|
- [Create a `config.py` file](https://www.youtube.com/watch?v=GW_2O9CrnSU)
|
|
|
|
### Flask handling file uploads
|
|
|
|
- [Handlin File Uploads](https://blog.miguelgrinberg.com/post/handling-file-uploads-with-flask) |