Ingredients auto complete, adding ingredients works. Some template tweaks.
[~kgodey/maayanwich.git] / templates / allsandwiches.html
1 {% extends "base.html" %}
2
3 {% block content %}
4                 {% for s in allsandwiches %}
5                         <h3 class="sandwichtitle">{{ s.adjective }}</h3>
6                         <p class="metadata">Made on {{ s.date_made|date:"F j Y" }} and added by {% if s.user.first_name %} {{ s.user.first_name }} {% if s.user.last_name %} {{ s.user.last_name }} {% endif %} {% else %} {{ s.user.username }}. {% endif %}</p>
7                         {% if s.picture %}
8                                 <img class="sandwichimg" src="{{ s.picture.url }}">
9                         {% endif %}
10                         <h4 class="sandwichsub">Ingredients</h4>
11                         <ul class="ingredients">
12                                 {% for i in s.ingredients.all %}
13                                         <li>{{ i.name }}
14                                 {% endfor %}
15                         </ul>
16                         {% if s.notes %}
17                                 <h4 class="sandwichsub">Notes</h5>
18                                 <p class="sandnotes"> {{ s.notes }}</p>
19                         {% endif %}
20                 {% endfor %}
21 {% endblock %}