#3 Added ability for images to be uploaded to the site

This commit is contained in:
2024-01-19 16:35:23 +00:00
parent 98a17bdc43
commit 3ce5d16651
4 changed files with 11 additions and 8 deletions

View File

@ -7,7 +7,7 @@
<div class="product-title">{{product.name}}</div>
<div class="product-information">
<div class="product-image">
<img src="{{url_for('static', filename=product.image)}}" alt="Brake Disks"/>
<img src="{{url_for('static', filename='assets/img/products/' + product.image)}}" alt="Brake Disks"/>
</div>
<div class="product-details">
<div class="product-price">£{{product.cost}}</div>

View File

@ -6,7 +6,7 @@
<input type="file" id="image" name="image" accept="image/x" required>
<select name="category" id="category">
{% for category in categories %}
<option value="{{category.name}}">{{category.name}}</option>
<option value="{{category.id}}">{{category.name}}</option>
{% endfor %}
</select>
<input type="number" id="cost" name="cost" placeholder=10.99 min=0 step=any required>