hint
This commit is contained in:
@@ -28,12 +28,12 @@ app.config["SECRET_KEY"] = os.environ.get("SECRET_KEY", "change-me-in-production
|
||||
app.config["DB_PATH"] = os.environ.get("DB_PATH", str(base_dir / "app.sqlite3"))
|
||||
app.config["UPLOAD_FOLDER"] = os.environ.get("UPLOAD_FOLDER", str(base_dir / "uploads"))
|
||||
app.config["MAX_CONTENT_LENGTH"] = int(os.environ.get("MAX_UPLOAD_BYTES", str(64 * 1024 * 1024)))
|
||||
app.config["LOCATION_NAME"] = os.environ.get("LOCATION_NAME", "Schlossgarten Venue")
|
||||
app.config["LOCATION_ADDRESS"] = os.environ.get("LOCATION_ADDRESS", "Musterstraße 12, 12345 Musterstadt")
|
||||
app.config["LOCATION_WEBSITE_URL"] = os.environ.get("LOCATION_WEBSITE_URL", "https://example.com/location")
|
||||
app.config["LOCATION_NAME"] = os.environ.get("LOCATION_NAME", "Hochheimer Terrasse")
|
||||
app.config["LOCATION_ADDRESS"] = os.environ.get("LOCATION_ADDRESS", "Mainzer Str. 22, 65239 Hochheim am Main")
|
||||
app.config["LOCATION_WEBSITE_URL"] = os.environ.get("LOCATION_WEBSITE_URL", "https://hochheimerterrasse.de/")
|
||||
app.config["GOOGLE_MAPS_EMBED_URL"] = os.environ.get(
|
||||
"GOOGLE_MAPS_EMBED_URL",
|
||||
"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d0",
|
||||
"https://www.google.com/maps?q=Hochheimer+Terrasse+Mainzer+Str.+22+65239+Hochheim+am+Main&output=embed",
|
||||
)
|
||||
app.config["WEDDING_DATE"] = os.environ.get("WEDDING_DATE", "")
|
||||
app.config["WEDDING_COUNTDOWN_ISO"] = os.environ.get("WEDDING_COUNTDOWN_ISO", "")
|
||||
@@ -52,6 +52,8 @@ ALLOWED_MIME_TYPES = {
|
||||
"image/heif-sequence",
|
||||
}
|
||||
|
||||
LOCATION_VIDEO_EXTENSIONS = {".mp4", ".webm", ".mov", ".m4v"}
|
||||
|
||||
DEFAULT_INVITATION_GROUPS = [
|
||||
{
|
||||
"name": "Bubus",
|
||||
@@ -218,48 +220,48 @@ HOTEL_RECOMMENDATIONS = [
|
||||
"name": "Parkhotel Sonnenberg",
|
||||
"address": "Friedrichstraße 65, 65343 Eltville am Rhein",
|
||||
"website_url": "https://parkhotel-sonnenberg.com/",
|
||||
"drive_minutes": "5",
|
||||
"walk_minutes": "27",
|
||||
"drive_minutes": "25",
|
||||
"walk_minutes": None,
|
||||
},
|
||||
{
|
||||
"id": "hotel_frankenbach",
|
||||
"name": "Hotel Frankenbach",
|
||||
"address": "Wilhelmstraße 13, 65343 Eltville am Rhein",
|
||||
"website_url": "https://www.hotel-frankenbach.de/",
|
||||
"drive_minutes": "5",
|
||||
"walk_minutes": "19",
|
||||
"drive_minutes": "25",
|
||||
"walk_minutes": None,
|
||||
},
|
||||
{
|
||||
"id": "spritzenhaus",
|
||||
"name": "Das Spritzenhaus",
|
||||
"address": "Platz von Montrichard 1, 65343 Eltville am Rhein",
|
||||
"website_url": "https://www.das-spritzenhaus.de/",
|
||||
"drive_minutes": "5",
|
||||
"walk_minutes": "22",
|
||||
"drive_minutes": "25",
|
||||
"walk_minutes": None,
|
||||
},
|
||||
{
|
||||
"id": "kronenschloesschen",
|
||||
"name": "Hotel Kronenschlösschen",
|
||||
"address": "Rheinallee, 65347 Eltville-Hattenheim",
|
||||
"website_url": "https://www.kronenschloesschen.de/",
|
||||
"drive_minutes": "6",
|
||||
"walk_minutes": "63",
|
||||
"drive_minutes": "30",
|
||||
"walk_minutes": None,
|
||||
},
|
||||
{
|
||||
"id": "kloster_eberbach",
|
||||
"name": "Kloster Eberbach",
|
||||
"address": "Kloster-Eberbach-Straße 1, 65346 Eltville am Rhein",
|
||||
"website_url": "https://www.kloster-eberbach.de/",
|
||||
"drive_minutes": "10",
|
||||
"walk_minutes": "69",
|
||||
"drive_minutes": "30",
|
||||
"walk_minutes": None,
|
||||
},
|
||||
{
|
||||
"id": "weinhaus_engel",
|
||||
"name": "Weinhaus & Hotel Engel",
|
||||
"address": "Hauptstraße 10, 65345 Eltville-Rauenthal",
|
||||
"website_url": "https://weinhaus-engel.com/rauenthal/",
|
||||
"drive_minutes": "10",
|
||||
"walk_minutes": "49",
|
||||
"drive_minutes": "25",
|
||||
"walk_minutes": None,
|
||||
},
|
||||
]
|
||||
|
||||
@@ -306,12 +308,12 @@ TEXTS = {
|
||||
"location": "Location",
|
||||
"gifts": "Geschenke",
|
||||
"visit_location": "Zur Location-Webseite",
|
||||
"location_story_title": "Klostermühle in den Weinbergen",
|
||||
"location_story_text": "Die Klostermühle liegt mitten in den Weinbergen und verbindet ein besonderes Weingut-Ambiente mit saisonaler Küche. Euch erwartet eine entspannte Atmosphäre zwischen Natur, gutem Essen und einem wunderschönen Rahmen für unseren Hochzeitstag.",
|
||||
"location_story_title": "Rheingauer Flair auf der Hochheimer Terrasse",
|
||||
"location_story_text": "Die Hochheimer Terrasse liegt in der historischen Altstadt von Hochheim und verbindet Rheingauer Atmosphäre mit einem eleganten Rahmen für unseren Hochzeitstag. Euch erwartet ein besonderer Ort zwischen Mainz, Wiesbaden und den Weinbergen, an dem wir gemeinsam feiern möchten.",
|
||||
"location_map_intro": "Damit ihr problemlos zur Location findet, könnt ihr direkt von hier zu Google Maps wechseln oder eine Route von eurem aktuellen Standort aus starten.",
|
||||
"route_from_current": "Route ab aktuellem Standort",
|
||||
"route_location_denied": "Standortfreigabe abgelehnt. Es wurde keine Route mit deinem Standort erstellt.",
|
||||
"route_location_unavailable": "Standort ist in diesem Browser derzeit nicht verfügbar.",
|
||||
"maps_privacy_notice": "Zur Anzeige der Karte werden Daten an Google übertragen.",
|
||||
"maps_load_button": "Google Maps anzeigen",
|
||||
"privacy": "Datenschutz",
|
||||
"imprint": "Impressum",
|
||||
@@ -328,16 +330,17 @@ TEXTS = {
|
||||
"schedule_arrival_title": "Ankunft",
|
||||
"schedule_arrival_text": "Wir freuen uns auf eure Ankunft.",
|
||||
"schedule_ceremony_title": "Trauzeremonie",
|
||||
"schedule_ceremony_text": "Trauzeremonie im Rosengarten und Fotos.",
|
||||
"schedule_ceremony_text": "Trauzeremonie im Hof und Fotos.",
|
||||
"schedule_reception_title": "Sektempfang & Häppchen",
|
||||
"schedule_reception_text": "Sektempfang im Hof der Klostermühle.",
|
||||
"schedule_reception_text": "Sektempfang im Hof der Hochheimer Terrasse.",
|
||||
"schedule_buffet_title": "Buffet-Eröffnung",
|
||||
"schedule_buffet_text": "Das Buffet wird eröffnet, danach folgen die Brautpaarspiele. Später gibt es zusätzlich Käseplatten.",
|
||||
"schedule_cake_title": "Tortenanschnitt",
|
||||
"schedule_cake_time": "Am Abend",
|
||||
"schedule_cake_text": "Gemeinsamer Tortenmoment am Abend.",
|
||||
"schedule_afterwards_time": "Anschließend",
|
||||
"schedule_party_title": "Party",
|
||||
"schedule_party_text": "Wir feiern gemeinsam bis 03:00 Uhr.",
|
||||
"schedule_party_text": "Wir feiern gemeinsam bis 03:30 Uhr.",
|
||||
"hotels_text": "Empfehlungen folgen. Bitte frühzeitig buchen.",
|
||||
"hotels_intro": "Hier findet ihr Hotels in der Nähe. Bitte bucht frühzeitig und schaut euch die aktuellen Preise direkt auf den Hotel-Webseiten an.",
|
||||
"hotel_visit_website": "Zur Hotel-Webseite",
|
||||
@@ -349,6 +352,7 @@ TEXTS = {
|
||||
"hotel_route_open_maps": "In Google Maps öffnen",
|
||||
"hotel_drive_badge": "Auto ca. {minutes} Min",
|
||||
"hotel_walk_badge": "Zu Fuß ca. {minutes} Min",
|
||||
"hotel_walk_not_recommended": "Zu Fuß nicht empfohlen",
|
||||
"hotel_parkhotel_sonnenberg_desc": "Ruhiges Hotel mit Blick über Eltville.",
|
||||
"hotel_hotel_frankenbach_desc": "Zentral in Eltville, gute Anbindung zur Location.",
|
||||
"hotel_spritzenhaus_desc": "Historisches Haus am Rhein mit modernen Zimmern.",
|
||||
@@ -447,12 +451,12 @@ TEXTS = {
|
||||
"location": "Location",
|
||||
"gifts": "Gifts",
|
||||
"visit_location": "Visit location website",
|
||||
"location_story_title": "Klostermuehle in the vineyards",
|
||||
"location_story_text": "Klostermuehle is surrounded by vineyards and combines a unique winery atmosphere with seasonal cuisine. Expect a relaxed setting with nature, great food, and a beautiful backdrop for our wedding day.",
|
||||
"location_story_title": "Rheingau flair at Hochheimer Terrasse",
|
||||
"location_story_text": "Hochheimer Terrasse is located in Hochheim's historic old town and combines Rheingau atmosphere with an elegant setting for our wedding day. It is a special place between Mainz, Wiesbaden, and the vineyards where we cannot wait to celebrate with you.",
|
||||
"location_map_intro": "To help you find the location easily, you can open Google Maps directly from here or start a route from your current location.",
|
||||
"route_from_current": "Route from current location",
|
||||
"route_location_denied": "Location access was denied. No route with your location was created.",
|
||||
"route_location_unavailable": "Location is currently unavailable in this browser.",
|
||||
"maps_privacy_notice": "To display the map, data will be transferred to Google.",
|
||||
"maps_load_button": "Show Google Maps",
|
||||
"privacy": "Privacy",
|
||||
"imprint": "Imprint",
|
||||
@@ -469,16 +473,17 @@ TEXTS = {
|
||||
"schedule_arrival_title": "Arrival",
|
||||
"schedule_arrival_text": "We look forward to welcoming you.",
|
||||
"schedule_ceremony_title": "Wedding Ceremony",
|
||||
"schedule_ceremony_text": "Wedding ceremony in the rose garden and photos.",
|
||||
"schedule_ceremony_text": "Wedding ceremony in the courtyard and photos.",
|
||||
"schedule_reception_title": "Sparkling Reception & Snacks",
|
||||
"schedule_reception_text": "Sparkling reception in the courtyard of the Klostermuehle.",
|
||||
"schedule_reception_text": "Sparkling reception in the courtyard of Hochheimer Terrasse.",
|
||||
"schedule_buffet_title": "Buffet Opening",
|
||||
"schedule_buffet_text": "The buffet opens, followed by wedding games. Cheese platters will be served later.",
|
||||
"schedule_cake_title": "Cake Cutting",
|
||||
"schedule_cake_time": "In the evening",
|
||||
"schedule_cake_text": "Cake cutting together in the evening.",
|
||||
"schedule_afterwards_time": "Afterwards",
|
||||
"schedule_party_title": "Party",
|
||||
"schedule_party_text": "We celebrate together until 3:00 AM.",
|
||||
"schedule_party_text": "We celebrate together until 3:30 AM.",
|
||||
"hotels_text": "Recommendations will follow. Please book early.",
|
||||
"hotels_intro": "Here are hotel options nearby. Please book early and check current rates directly on each hotel website.",
|
||||
"hotel_visit_website": "Visit hotel website",
|
||||
@@ -490,6 +495,7 @@ TEXTS = {
|
||||
"hotel_route_open_maps": "Open in Google Maps",
|
||||
"hotel_drive_badge": "By car about {minutes} min",
|
||||
"hotel_walk_badge": "On foot about {minutes} min",
|
||||
"hotel_walk_not_recommended": "Walking not recommended",
|
||||
"hotel_parkhotel_sonnenberg_desc": "Quiet hotel with a view over Eltville.",
|
||||
"hotel_hotel_frankenbach_desc": "Central in Eltville with good access to the venue.",
|
||||
"hotel_spritzenhaus_desc": "Historic house by the Rhine with modern rooms.",
|
||||
@@ -663,7 +669,11 @@ def get_hotels_for_page() -> list[dict]:
|
||||
"website_url": entry["website_url"],
|
||||
"description": t(f"hotel_{entry['id']}_desc"),
|
||||
"drive_badge": t("hotel_drive_badge").format(minutes=entry["drive_minutes"]),
|
||||
"walk_badge": t("hotel_walk_badge").format(minutes=entry["walk_minutes"]),
|
||||
"walk_badge": (
|
||||
t("hotel_walk_badge").format(minutes=entry["walk_minutes"])
|
||||
if entry["walk_minutes"]
|
||||
else t("hotel_walk_not_recommended")
|
||||
),
|
||||
"drive_route_url": build_google_maps_directions(entry["address"], "driving"),
|
||||
"walk_route_url": build_google_maps_directions(entry["address"], "walking"),
|
||||
"drive_route_embed_url": build_google_maps_route_embed(entry["address"], "driving"),
|
||||
@@ -673,10 +683,22 @@ def get_hotels_for_page() -> list[dict]:
|
||||
return hotels
|
||||
|
||||
|
||||
def get_location_video_asset() -> str | None:
|
||||
location_dir = base_dir / "static" / "assets" / "location"
|
||||
if not location_dir.exists():
|
||||
return None
|
||||
|
||||
for asset in sorted(location_dir.iterdir()):
|
||||
if asset.is_file() and asset.suffix.lower() in LOCATION_VIDEO_EXTENSIONS:
|
||||
return f"assets/location/{asset.name}"
|
||||
return None
|
||||
|
||||
|
||||
@app.context_processor
|
||||
def inject_common() -> dict:
|
||||
role = session.get("role", "guest")
|
||||
group_id = session.get("group_id")
|
||||
location_video_asset = get_location_video_asset()
|
||||
return {
|
||||
"t": t,
|
||||
"lang": get_lang(),
|
||||
@@ -691,6 +713,7 @@ def inject_common() -> dict:
|
||||
"location_website_url": app.config["LOCATION_WEBSITE_URL"],
|
||||
"location_route_url": build_google_maps_destination(app.config["LOCATION_ADDRESS"], "driving"),
|
||||
"google_maps_embed_url": app.config["GOOGLE_MAPS_EMBED_URL"],
|
||||
"location_video_url": url_for("static", filename=location_video_asset) if location_video_asset else None,
|
||||
"wedding_date": app.config["WEDDING_DATE"],
|
||||
"wedding_countdown_iso": get_wedding_countdown_iso(),
|
||||
"hero_image_url": url_for("static", filename=get_hero_image_asset()),
|
||||
|
||||
Reference in New Issue
Block a user