view listing

This commit is contained in:
2025-01-20 17:51:42 +08:00
parent 628c2b6496
commit 424bb885ca
2 changed files with 26 additions and 0 deletions
+5
View File
@@ -115,3 +115,8 @@ def booking(listing_id):
db.session.commit()
return redirect(url_for('home'))
return render_template('booking.html', listing=listing, unavailable_dates=unavailable_dates)
@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)