From: Kriti Godey Date: Fri, 5 Mar 2010 01:49:08 +0000 (-0500) Subject: cleaned up invisibles X-Git-Url: http://git.ithinksw.org/~kgodey/maayanwich.git/commitdiff_plain/4c304fe631bb60e070fc61d92baeec11825488d7 cleaned up invisibles --- diff --git a/models.py b/models.py index ed6410f..3139b47 100644 --- a/models.py +++ b/models.py @@ -5,8 +5,6 @@ from django.core.urlresolvers import reverse from django.template.defaultfilters import slugify - - class Ingredient(models.Model): name = models.CharField(max_length=100) slug = models.SlugField() diff --git a/views.py b/views.py index cb8e7e6..18f6ea1 100644 --- a/views.py +++ b/views.py @@ -45,7 +45,7 @@ def add_ingredient(request): form = IngredientForm() # An unbound form return render_to_response('ingredient.html', {'iform': form, 'sandwiches': sandwiches}) - + def all_sandwich(request): try: @@ -58,7 +58,7 @@ def all_sandwich(request): raise Http404 return render_to_response('allsandwiches.html', {'allsandwiches': allsandwiches, 'sandwiches': sandwiches}) - + def baseview(request): try: if Sandwich.objects.count() > 5: @@ -70,16 +70,16 @@ def baseview(request): except Sandwich.DoesNotExist: raise Http404 return render_to_response('base.html', {'sandwiches': sandwiches, 'all': allsandwiches,}) - - + + def sandwich_month(request, year, month): try: sandwiches = Sandwich.objects.filter(date_made__month=month, date_made__year=year) except Sandwich.DoesNotExist: raise Http404 return render_to_response('allsandwiches.html', {'sandwiches': sandwiches,}) - - + + def specific_sandwich(request, slug): try: s = Sandwich.objects.get(slug=slug) @@ -115,7 +115,8 @@ def login_view(request): except KeyError: aform = AuthenticationForm() return render_to_response('login.html', {'aform': aform, 'sandwiches': sandwiches,}) - + + def create_user(request): if Sandwich.objects.count() > 5: sandwiches = Sandwich.objects.order_by('date_made')[:5]