For me it is supported..

take a look, this is a plugin_wiki based "outdated" website


http://web2pybrasil.appspot.com (the search box called 'Busca')

The code behind:

 @staticmethod
    def searchPages(string=None,nfmessage='Nothing found with %s'):

        string = request.vars.search
        pages = db(db.plugin_wiki_page.id>0).select().find(lambda row:string
and (string in row.slug or string in row.body or string in row.title) and
not row.slug.*startswith*('meta'))
        if pages:
             return '<b>Resultados</b></br> %s  ' %
UL(*[LI(A(XML(page.title),_href=URL(request.application,'plugin_wiki','page',args=page.slug)))
for page in pages])
         else:
             return nfmessage % string
        else:
            return ''

2011/7/3 José Luis Redrejo Rodríguez <jredr...@debian.org>

> startswith and endswith are not supported in GAE either
>
> 2011/7/3 Bruno Rocha <rochacbr...@gmail.com>:
> > I dont know about autocomplete widget, but, for 'like' in GAE you can use
> > Row.find()
> >
> >         term = "something"
> >         pages = db(db.table.id>0).select().find(lambda row :
> > row.field.startswith(term) or row.field.endswith(term) or row.field ==
> term
> > or term in row.field)
> >
> > On Sun, Jul 3, 2011 at 12:53 PM, José L. <jredr...@gmail.com> wrote:
> >>
> >> I've checked autocomplete widget can not work in gae, as it uses like in
> >> its callback.
> >> Checking this group archives, I've found this
> >> thread: https://groups.google.com/d/topic/web2py/HdnWTp7h3Do/discussion
> >> but even if it looks like it would work, finally it was not implemented.
> >> So, does anybody know of any workaround to make autocomplete work in
> GAE?
> >> BTW: A note should be added at the web2py book section
> >> (http://www.web2py.com/book/default/chapter/07#Autocomplete-Widget )
> warning
> >> it does not work in gae. It will save time to many people.
> >> Regards.
> >> José L.
> >
> >
> > --
> >
> >
> >
> > --
> > Bruno Rocha
> > [ About me: http://zerp.ly/rochacbruno ]
> > [ Aprenda a programar: http://CursoDePython.com.br ]
> > [ O seu aliado nos cuidados com os animais: http://AnimalSystem.com.br ]
> > [ Consultoria em desenvolvimento web: http://www.blouweb.com ]
> >
>



-- 



--
Bruno Rocha
[ About me: http://zerp.ly/rochacbruno ]
[ Aprenda a programar: http://CursoDePython.com.br ]
[ O seu aliado nos cuidados com os animais: http://AnimalSystem.com.br ]
[ Consultoria em desenvolvimento web: http://www.blouweb.com ]

Reply via email to