From b632b69d08450a46dc955ea10e9a0ba1510e4bc9 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Fri, 14 Aug 2015 14:50:29 -0400 Subject: [PATCH] Simplify home view by redirecting to results view. --- .../appearance/templates/appearance/home.html | 2 +- mayan/apps/common/views.py | 28 ------------------- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/mayan/apps/appearance/templates/appearance/home.html b/mayan/apps/appearance/templates/appearance/home.html index 47f5e1831a..e405e9acd5 100644 --- a/mayan/apps/appearance/templates/appearance/home.html +++ b/mayan/apps/appearance/templates/appearance/home.html @@ -52,7 +52,7 @@
-
+
diff --git a/mayan/apps/common/views.py b/mayan/apps/common/views.py index 25dab758e7..5d9bc30a77 100644 --- a/mayan/apps/common/views.py +++ b/mayan/apps/common/views.py @@ -105,34 +105,6 @@ class CurrentUserLocaleProfileEditView(SingleObjectEditView): class HomeView(TemplateView): template_name = 'appearance/home.html' - def get_context_data(self, **kwargs): - data = super(HomeView, self).get_context_data(**kwargs) - data.update({ - 'hide_links': True, - 'search_results_limit': 100, - 'search_terms': self.request.GET.get('q'), - 'missing_list': [ - item for item in MissingItem.get_all() if item.condition() - ], - }) - return data - - def get(self, request, *args, **kwargs): - context = self.get_context_data(**kwargs) - - queryset, ids, timedelta = document_search.search( - request.GET, request.user - ) - - # Update the context with the search results - context.update({ - 'object_list': queryset, - 'time_delta': timedelta, - 'title': _('Results'), - }) - - return self.render_to_response(context) - class LicenseView(SimpleView): extra_context = {