Added an index instead of "all sandwiches", made custom titles for every page.
[~kgodey/maayanwich.git] / views.py
index fde9e56..bc4798b 100644 (file)
--- a/views.py
+++ b/views.py
@@ -104,6 +104,13 @@ def all_sandwich(request):
        except Sandwich.DoesNotExist:
                raise Http404
        return render_to_response('allsandwiches.html', {'allsandwiches': allsandwiches,}, context_instance=RequestContext(request))
+       
+def index_sandwich(request):
+       try:
+               allsandwiches = Sandwich.objects.order_by('adjective')
+       except Sandwich.DoesNotExist:
+               raise Http404
+       return render_to_response('indexsandwiches.html', {'allsandwiches': allsandwiches,}, context_instance=RequestContext(request))
 
 
 def sandwich_month(request, year, month):