diff --git a/fet2020/search/views.py b/fet2020/search/views.py index de5c67fd..546f76d4 100644 --- a/fet2020/search/views.py +++ b/fet2020/search/views.py @@ -4,6 +4,7 @@ from haystack.query import SearchQuerySet from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import render +from authentications.decorators import authenticated_user from .forms import FetUserSearchForm, NonUserSearchForm @@ -19,6 +20,7 @@ class NonUserSearchView(SearchView): form_class = NonUserSearchForm +@authenticated_user def index(request): if request.user.is_authenticated: return FetUserSearchView.as_view()(request) diff --git a/fet2020/templates/base.html b/fet2020/templates/base.html index 78c4e825..f2814f2d 100644 --- a/fet2020/templates/base.html +++ b/fet2020/templates/base.html @@ -5,6 +5,7 @@ {% block body %}
+ {% if request.user.is_authenticated %}