Commit b20e703c authored by Daniel W Bond's avatar Daniel W Bond

is_authenticated is a propertie, not a method now

parent 4f042b70
......@@ -16,7 +16,7 @@ class HomepageView(TemplateView):
def get_context_data(self, **kwargs):
context = super(HomepageView, self).get_context_data(**kwargs)
if self.request.user.is_authenticated():
if self.request.user.is_authenticated:
context['lookouts'] = Lookout.objects.filter(owner=self.request.user.student)
return context
......
......@@ -187,7 +187,7 @@ class ListingPage(View):
# https://docs.djangoproject.com/en/1.7/topics/class-based-views/mixins/#an-alternative-better-solution
def get(self, request, *args, **kwargs):
if self.request.user.is_authenticated():
if self.request.user.is_authenticated:
view = DetailListing.as_view()
return view(request, *args, **kwargs)
else:
......@@ -198,7 +198,7 @@ class ListingPage(View):
# rate limit is higher for bids
@ratelimit(key='user', rate='100/d', method='POST', block=True)
def post(self, request, *args, **kwargs):
if self.request.user.is_authenticated():
if self.request.user.is_authenticated:
view = CreateBid.as_view()
return view(request, *args, **kwargs)
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment