Skip to content

Commit

Permalink
Added implementation of Database storing for the Add to Cart page.
Browse files Browse the repository at this point in the history
The events which will be booked from add to cart will be stored in the database.
  • Loading branch information
prathamkshah13 committed Apr 12, 2024
1 parent 0878c6c commit 1a5bf5f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Django/communicado/pages/templates/pages/add_to_cart.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{% load static %}
<!DOCTYPE html>
<html lang="en">
Expand Down Expand Up @@ -103,6 +102,10 @@
padding: 5px 10px;
margin-left: 10px; /* Add left margin to match the position of the "Back to Events" button */
}

.label-text {
color: white;
}

</style>
</head>
Expand All @@ -117,8 +120,9 @@
<th>Name</th>
<th>Date and Time</th>
<th>Location</th>
<th>Quantity</th>

<th>Price</th>
<th>Any Extra Information </th>
</tr>
</thead>
<tbody>
Expand All @@ -131,9 +135,7 @@
<td>{{ event.name }}</td>
<td>{{ event.eventDateTime }}</td>
<td>{{ event.location }}</td>
<td>
<input type="number" id="quantity" name="quantity" class="quantity-field" value="1" min="1">
</td>

<td>${{event.price}}</td>
</tr>

Expand All @@ -150,6 +152,7 @@
{% csrf_token %}
<a href="{% url 'events' %}" class="back-button">Back to Events</a>
<button type="submit" class="book-button">Book</button>
<label for="quantity" class="label-text">Quantity:</label>
<input type="number" id="quantity" name="quantity" class="quantity-field" value="1" min="1">

</form>
Expand Down

0 comments on commit 1a5bf5f

Please sign in to comment.