From df689da172dfd36fe2512833a5c7c07ad5cb6446 Mon Sep 17 00:00:00 2001 From: Kriti Godey Date: Fri, 5 Mar 2010 16:17:34 -0500 Subject: [PATCH] Added a custom context processor (to pass in the context required for the sidebar), and made image display depend on whether an image actually existed. --- templates/allsandwiches.html | 4 +++- templates/base.html | 6 +++--- templates/onesandwich.html | 4 +++- views.py | 30 +++++++++++++++++------------- 4 files changed, 26 insertions(+), 18 deletions(-) diff --git a/templates/allsandwiches.html b/templates/allsandwiches.html index 4877263..24f15b7 100644 --- a/templates/allsandwiches.html +++ b/templates/allsandwiches.html @@ -5,7 +5,9 @@ {% for s in allsandwiches %}

{{ s.adjective }}

Made on {{ s.date_made }} and added by {{ s.user.username }}.

- + {% if s.picture %} + + {% endif %}

Ingredients