show property_type

This commit is contained in:
2025-01-20 18:01:15 +08:00
parent 896a69ade7
commit a0b0082b76
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -119,4 +119,5 @@ def booking(listing_id):
@app.route('/view/<int:listing_id>', methods=['GET'])
def view_listing(listing_id):
listing = Listing.query.get_or_404(listing_id)
return render_template('view.html', listing=listing)
property_type_display = Listing.PROPERTY_TYPES.get(listing.property_type, 'Unknown')
return render_template('view.html', listing=listing, property_type_display=property_type_display)