summaryrefslogtreecommitdiff
path: root/objectapp/views
diff options
context:
space:
mode:
authorAnuja <anujag@anujag-Latitude-D630.(none)>2012-03-21 17:34:34 +0530
committerAnuja <anujag@anujag-Latitude-D630.(none)>2012-03-21 17:34:34 +0530
commit874fceac6498f2ba733c433b964f9ce5975d6a69 (patch)
treeaee7c168a44287d5b8ec22582d654b970eb6108e /objectapp/views
parent9d76c138b63828b549b33fe1b9a8ad4ab3dd8d86 (diff)
downloadgnowsys-874fceac6498f2ba733c433b964f9ce5975d6a69.tar.gz
Changes made on model files and search files
Diffstat (limited to 'objectapp/views')
-rw-r--r--objectapp/views/search.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/objectapp/views/search.py b/objectapp/views/search.py
index bb9fe9df..567d66e4 100644
--- a/objectapp/views/search.py
+++ b/objectapp/views/search.py
@@ -65,27 +65,27 @@
from django.utils.translation import ugettext as _
from django.views.generic.list_detail import object_list
-from objectapp.models import Gbobject
+from gstudio.models import Node
from objectapp.settings import PAGINATION
+from gstudio.managers import *
-
-def gbobject_search(request):
+def nodes_search(request):
"""Search gbobjects matching with a pattern"""
error = None
pattern = None
- gbobjects = Gbobject.published.none()
+ nodes = Node.published.none()
if request.GET:
pattern = request.GET.get('pattern', '')
if len(pattern) < 3:
error = _('The pattern is too short')
else:
- gbobjects = Gbobject.published.search(pattern)
+ nodes = Node.published.search(pattern)
else:
error = _('No pattern to search found')
- return object_list(request, queryset=gbobjects,
+ return object_list(request, queryset=nodes,
paginate_by=PAGINATION,
- template_name='objectapp/gbobject_search.html',
+ template_name='gstudio/nodes_search.html',
extra_context={'error': error,
'pattern': pattern})