https://github.com/devmunro/intro-to-flask
Flask demo showing setup, routes, dynamic routes, and HTML templates
https://github.com/devmunro/intro-to-flask
Last synced: 9 months ago
JSON representation
Flask demo showing setup, routes, dynamic routes, and HTML templates
- Host: GitHub
- URL: https://github.com/devmunro/intro-to-flask
- Owner: devmunro
- Created: 2025-09-27T08:35:18.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-09-27T10:25:04.000Z (9 months ago)
- Last Synced: 2025-09-27T10:26:45.263Z (9 months ago)
- Language: Python
- Size: 4.88 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Intro to Flask
Welcome to the **Intro to Flask** repository!
*This repo is based on the live session - Intro to Flask*

## Overview
The repository is split into **branches for each step**:
| Step | Branch | Content |
|------|--------|--------------------------------------------------------|
| Step 1 | `step-1-setup` | Minimal Flask app with a basic home route |
| Step 2 | `step-2-static-pages` | Static routes and HTML templates (`/` and `/about`) |
| Step 3 | `step-3-dynamic-routes` | Dynamic routes using URL variables (`/blog/`) |
---
## Getting Started
1. Clone this repository:
```bash
git clone https://github.com/devmunro/intro-to-flask.git
cd intro-to-flask
pip install -r requirements.txt #pip3 for mac
```
2. Switch to the branch you want to explore
```bash
git checkout step-1-setup
# or step-2-static-pages
# or step-3-dynamic-routes
```
3. Run the Flask app
```bash
python app.py
#visit - http://localhost:5050/
```
## Notes for Students
- debug=True lets Flask reload the server automatically when you save changes.
- Default Flask port is 5000; here we use 5050.
- render_template() looks in the templates/ folder by default.
- Official Flask documentation: https://flask.palletsprojects.com/en/stable/quickstart/