Added a view for all sandwiches, and configured URLS for it.
[~kgodey/maayanwich.git] / templates / allsandwiches.html
diff --git a/templates/allsandwiches.html b/templates/allsandwiches.html
new file mode 100644 (file)
index 0000000..64f734f
--- /dev/null
@@ -0,0 +1,20 @@
+<html>
+       <head>
+               <title>Every Ma'ayanwich Ever!</title></head>
+       <body>
+               <h1>All Ma'ayanwiches</h1>
+               {% for s in sandwiches %}
+                       <h3>{{ s.adjective }}</h3>
+                       <p>Made on {{ s.date_made }} and added by {{ s.user.username }}.</p>
+                       <img src="{{ s.picture }}">
+                       <h5>Ingredients</h5>
+                       <ul>
+                               {% for i in s.ingredients.all %}
+                                       <li>{{ i.name }}
+                               {% endfor %}
+                       </ul>
+                       <h5>Notes</h5>
+                       <p> {{ s.notes }}</p>
+               {% endfor %}
+       </body>
+</html>
\ No newline at end of file