Changeset 4957 for main/waeup.sirp/trunk


Ignore:
Timestamp:
1 Feb 2010, 16:20:59 (15 years ago)
Author:
uli
Message:
  • Remove unused imports.
  • Fix indents.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py

    r4956 r4957  
    99import sys
    1010from hurry import yui
    11 from hurry.query import Eq
    12 from hurry.query.query import Query, Text
    1311from hurry.workflow.interfaces import NoTransitionAvailableError
    1412from waeup.sirp.browser import (WAeUPPage, WAeUPEditFormPage, WAeUPAddFormPage,
     
    236234
    237235class SearchPage(WAeUPPage):
    238      grok.context(IUniversity)
    239      grok.name('search')
    240      grok.template('searchpage')
    241      grok.require('waeup.View')
    242      title = u"Site Search"
    243      pnav = 2
    244 
    245      def update(self, *args, **kw):
    246           form = self.request.form
    247           self.hitlist = []
    248           self.query = ''
    249           if not 'query' in form:
    250                return
    251           query = form['query']
    252           self.query = query
    253           self.hitlist = search(query=self.query, view=self)
    254           return
     236    grok.context(IUniversity)
     237    grok.name('search')
     238    grok.template('searchpage')
     239    grok.require('waeup.View')
     240    title = u"Site Search"
     241    pnav = 2
     242
     243    def update(self, *args, **kw):
     244        form = self.request.form
     245        self.hitlist = []
     246        self.query = ''
     247        if not 'query' in form:
     248            return
     249        query = form['query']
     250        self.query = query
     251        self.hitlist = search(query=self.query, view=self)
     252        return
    255253
    256254#
Note: See TracChangeset for help on using the changeset viewer.