web/views/magicsearch.py
branchtls-sprint
changeset 680 99d0b471cc0c
parent 661 4f61eb8a96b7
child 984 536e421b082b
equal deleted inserted replaced
679:d70fb8c9e369 680:99d0b471cc0c
     1 """a query preprocesser to handle quick search shortcuts for cubicweb
     1 """a query preprocesser to handle quick search shortcuts for cubicweb
     2 
     2 
     3 
     3 
     4 :organization: Logilab
     4 :organization: Logilab
     5 :copyright: 2001-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     5 :copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     6 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
     6 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
     7 """
     7 """
     8 
     8 
     9 __docformat__ = "restructuredtext en"
     9 __docformat__ = "restructuredtext en"
    10 
    10 
    13 
    13 
    14 from rql import RQLSyntaxError, BadRQLQuery, parse
    14 from rql import RQLSyntaxError, BadRQLQuery, parse
    15 from rql.nodes import Relation
    15 from rql.nodes import Relation
    16 
    16 
    17 from cubicweb import Unauthorized
    17 from cubicweb import Unauthorized
    18 from cubicweb.common.appobject import Component
    18 from cubicweb.common.view import Component
    19 
    19 
    20 LOGGER = getLogger('cubicweb.magicsearch')
    20 LOGGER = getLogger('cubicweb.magicsearch')
    21 
    21 
    22 def _get_approriate_translation(translations_found, eschema):
    22 def _get_approriate_translation(translations_found, eschema):
    23     """return the first (should be the only one) possible translation according
    23     """return the first (should be the only one) possible translation according