This project is a Flask implementation of the Florence hotel frontend based on florence_hote.html.
Project Structure
app.py- Flask application entrypointtemplates/index.html- Main hotel website page (Flask template)requirements.txt- Python dependenciesflorence_hote.html- Original reference frontend file
Prerequisites
- Python 3.9+ (recommended)
pip
Setup and Run
- Open terminal in the project folder:
bash
cd /Users/nelsonlai/sources/freelance/Florence_Hotel
- (Optional but recommended) Create and activate a virtual environment:
bash
python3 -m venv .venv
source .venv/bin/activate
- Install dependencies:
bash
pip install -r requirements.txt
- Start the Flask app:
bash
python3 app.py
- Open your browser:
http://127.0.0.1:5000
Development Notes
- The page is served from Flask route
/. - The footer year is dynamically rendered using Flask/Jinja.
- Styling and fonts are loaded from Tailwind CDN and Google Fonts.
- Multilingual support is available via query parameter
lang.
Language Support
The site currently supports:
- English (
en) - Italian (
it) - French (
fr) - Spanish (
es) - Traditional Chinese (
zh-tw)
You can change language in two ways:
- Use the language selector in the top navigation bar.
- Open the URL with a language query string, for example:
http://127.0.0.1:5000/?lang=enhttp://127.0.0.1:5000/?lang=ithttp://127.0.0.1:5000/?lang=frhttp://127.0.0.1:5000/?lang=eshttp://127.0.0.1:5000/?lang=zh-tw