Skip to content

mrorigo/flask_demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask Demo App

This is a simple Flask web application created for training and demonstration purposes. It showcases basic routing, template rendering, static file serving, and form handling in Flask.

Project Structure

flask_demo/
│
├── app.py
├── requirements.txt
├── static/
│   └── style.css
└── templates/
    ├── about.html
    └── index.html
  • app.py: Main application file containing Flask routes and logic.
  • requirements.txt: Lists required Python packages.
  • static/style.css: Stylesheet for the web pages.
  • templates/index.html: Home page template with a feedback form.
  • templates/about.html: About page template.

Purpose

  • Demonstrate basic Flask features:
    • Routing (/, /about, /feedback)
    • HTML template rendering
    • Serving static files
    • Handling form submissions

Result

  • Home Page: Welcome message and a feedback form.
  • About Page: Information about the app.
  • Feedback Submission: Displays a thank you message with submitted feedback.

Setup Instructions

1. Clone or Download the Project

Download or clone the repository to your local machine.

2. Install Python

Ensure you have Python 3.7+ installed. You can download it from python.org.

3. (Recommended) Create a Virtual Environment

Create and activate a virtual environment to isolate dependencies:

On Windows:

python -m venv venv
venv\Scripts\activate

On macOS/Linux:

python3 -m venv venv
source venv/bin/activate

4. Install Dependencies

Navigate to the project directory and install dependencies using pip:

pip install -r requirements.txt

5. Run the Application

Start the Flask development server:

python app.py

The app will run on http://localhost:5000.

6. Access the App

Feedback Form

On the home page, fill out the feedback form and submit. Your name and message will be displayed as a thank you response.

Demo Video Link

https://www.loom.com/share/c65d848b1a3f457e9e8b9ab510fe75f5?sid=49123e48-35cb-4210-98d5-55ffddc99faa

About

Demo Flask App

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 56.9%
  • Python 30.7%
  • CSS 12.4%