diff --git a/pflaenzli/pflaenzli/templates/offer/detail.html b/pflaenzli/pflaenzli/templates/offer/detail.html index a82121a..053bdf2 100644 --- a/pflaenzli/pflaenzli/templates/offer/detail.html +++ b/pflaenzli/pflaenzli/templates/offer/detail.html @@ -76,11 +76,11 @@

{{ offer.user.username }} would like some of the following in return:

{% if wishes %} - - {% else %} + {% else %} + {% endif %}
Offer trade diff --git a/pflaenzli/pflaenzli/views.py b/pflaenzli/pflaenzli/views.py index cf2c974..963b1ed 100644 --- a/pflaenzli/pflaenzli/views.py +++ b/pflaenzli/pflaenzli/views.py @@ -38,8 +38,9 @@ def create_offer(request): @ login_required def offer_detail(request, offer_id): offer = get_object_or_404(Offer, id=offer_id) + wishes = Wish.objects.filter(user=offer.user) - return render(request, "offer/detail.html", {"offer": offer, "wishes": ["Monstera", "Tradescantia"]}) + return render(request, "offer/detail.html", {"offer": offer, "wishes": wishes}) @login_required