fixes
This commit is contained in:
@@ -60,4 +60,6 @@ class Booking(db.Model):
|
||||
listing_id = db.Column(db.Integer, db.ForeignKey('listing.id'), nullable=False)
|
||||
check_in = db.Column(db.DateTime, nullable=False)
|
||||
check_out = db.Column(db.DateTime, nullable=False)
|
||||
guests = db.Column(db.Integer, nullable=False)
|
||||
guests = db.Column(db.Integer, nullable=False)
|
||||
|
||||
listing = db.relationship('Listing', backref='bookings')
|
||||
@@ -73,7 +73,7 @@
|
||||
<td>{{ booking.user_id }}</td>
|
||||
<td>{{ booking.listing.title if booking.listing else 'Unknown' }}</td>
|
||||
<td>{{ booking.listing.location if booking.listing else 'Unknown' }}</td>
|
||||
<td>{{ booking.listing.property_type if booking.listing else 'Unknown' }}</td>
|
||||
<td>{{ booking.listing.PROPERTY_TYPES.get(booking.listing.property_type, 'Unknown') }}</td>
|
||||
<td>{{ booking.check_in.strftime('%Y-%m-%d') }}</td>
|
||||
<td>{{ booking.check_out.strftime('%Y-%m-%d') }}</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user