First commit of the this repo
This commit is contained in:
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
.env
|
||||||
|
instance/
|
||||||
|
.python-version
|
||||||
|
*.db
|
||||||
10
notes.md
Normal file
10
notes.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
1. app/__init__.py ✅ Spot on!
|
||||||
|
This is called the Application Factory — it creates the Flask app, registers the database, login manager, and tells Flask where templates and static files live. "Initiates and tells Flask where is what" is exactly right. Better word: initialises! 🎯
|
||||||
|
|
||||||
|
2. run.py ✅ Correct!
|
||||||
|
Exactly right — it's the entry point. It imports your app and runs it. And yes, we'll set it to development mode first so we get helpful error messages and auto-reload when we change code. 💪
|
||||||
|
|
||||||
|
3. templates/ and static/ inside app/ ✅ Good instinct!
|
||||||
|
The full reason is: Flask looks for templates and static files relative to the app package by default. Keeping them inside app/ means Flask finds them automatically without extra configuration. And when your project grows to multiple modules later, each module can have its own templates folder — super clean! 🎯
|
||||||
|
|
||||||
|
find . -not -path './.git/*' -not -path './__pycache__/*'
|
||||||
Reference in New Issue
Block a user