Skip to content
Snippets Groups Projects
Commit 20753a6b authored by Ethan-clay03's avatar Ethan-clay03
Browse files

Fix modal bug

parent 01e07d19
No related branches found
No related tags found
No related merge requests found
......@@ -32,12 +32,14 @@ def listings():
item.main_image_url = url_for('main.upload_file', filename=item.listing_images[0].image_location)
else:
item.main_image_url = "/path/to/default-image.jpg"
item.image_urls = json.dumps([url_for('main.upload_file', filename=img.image_location) for img in item.listing_images])
# Must replace with single quotes otherwise JS does not load modal correctly
item.image_urls = json.dumps([url_for('main.upload_file', filename=img.image_location) for img in item.listing_images]).replace('"', '"')
return render_template('bookings/listings.html', items=all_listings)
@bp.route('/listing/<int:id>')
def show_listing(id):
Listings.get
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment