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):
guser.email = email
guser.save()
return render_to_response('userchanged.html', context_instance=RequestContext(request))
+ else:
+ return render_to_response('edituser.html', {'cform': form,}, context_instance=RequestContext(request))
else:
form = NewUserForm(initial={'username': guser.username, 'first_name': guser.first_name, 'last_name': guser.last_name, 'email': guser.email, }) # An unbound form
return render_to_response('edituser.html', {'cform': form,}, context_instance=RequestContext(request))