Skip to content

Commit

Permalink
Remove login_required (#1965)
Browse files Browse the repository at this point in the history
  • Loading branch information
alanmoo authored and Pomax committed Oct 18, 2018
1 parent f67e70e commit 41f6b7e
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions network-api/networkapi/buyersguide/views.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from django.core.exceptions import ObjectDoesNotExist, ValidationError
from django.db import Error
from django.shortcuts import render, get_object_or_404
from django.contrib.auth.decorators import login_required
from django.conf import settings
from django.views.decorators.csrf import csrf_protect
from rest_framework.parsers import JSONParser
Expand All @@ -28,9 +27,6 @@ def get_average_creepiness(product):
return 50


# Login required so we can continue to develop this and merge into master without the public seeing it.
# Remove this when we're ready to launch.
@login_required
def buyersguide_home(request):
products = [p.to_dict() for p in Product.objects.all()]
products.sort(key=lambda p: get_average_creepiness(p))
Expand All @@ -41,7 +37,6 @@ def buyersguide_home(request):
})


@login_required
def category_view(request, categoryname):
category = get_object_or_404(BuyersGuideProductCategory, name__iexact=categoryname)
products = [p.to_dict() for p in Product.objects.filter(product_category__in=[category]).distinct()]
Expand All @@ -53,7 +48,6 @@ def category_view(request, categoryname):
})


@login_required
def product_view(request, slug):
product = get_object_or_404(Product, slug=slug)
return render(request, 'product_page.html', {
Expand All @@ -64,7 +58,6 @@ def product_view(request, slug):
})


@login_required
def about_view(request):
return render(request, 'about.html', {
'categories': BuyersGuideProductCategory.objects.all(),
Expand Down

0 comments on commit 41f6b7e

Please sign in to comment.